`
文章列表
Making a web app to support multiple languages.   This is achieved in JSF2 by using message properties files (resource bundles) and load the correct key/value pair from these resource files, based on the current locale the web application is set.   One configuration is in the "faces-config.x ...
• Action listeners – Attached to buttons, hypertext links, or image maps – Automatically submit the form - when to use: business method/handler   jsf page: <h:commandButton action="#{bean.doSomething}"/>   jsf2 backing bean: public String doSomething() {     ...     return ...
Templating can reuse some common code. This example discusses the simplest JSF2 templating with facelet tags.   To define a template, one can use facelet tag <ui:insert name="title"></ui:insert>. This creates a placeholder to insert real content to generate the final jsf page ...
JBoss 7.1 has the log4j module built in. When developing, the project can just include the logging API lib (like log4j) in the project classpath, so that the project compiles. When build, the log4j.jar/log4j.xml/log4j.properties does not need to be packed in the deployment archive (ear, or war). It w ...
this is the zipped project which is ready for build and deploy to JBoss7.1.1   1. it uses oracle database. you need to deploy the jdbc driver and configure a datasource for it. Take a look at  "MEAT-INF/persistence.xml" for more info.   2. it uses own log4j. To enable log4j working prop ...
JBoss 7.1.1.Final has been released in 3月份 2012. Lets take a look at its directories, how to deploy and how to configure data source. 1. Directory Layout: JBoss 7 is fundamentally different from previous releases. It's module based and has a new directory layout. My understanding is that it has a &q ...
Problem: There is a problem when dealing with big data set. For instance, if we have millions of records in database to search and display, we cannot just use a @SessionScoped backing bean to put the search result list in memory. This would quickly exhaust server memory if many users are online. Th ...
"wsimport" is a tool from the JAX-WS module. Sine from version 2.0, JAX-WS is a standard part of the JDK, it should be installed already and available to you if you have JDK1.6 installed on your box. "wsimport" helps to generate the classes to consume a web service. the only requ ...
Exposing an EJB as web service is just a matter of a few annotations. This example exposes an ejb as standard SOAP web services. It uses default JAX-WS 2.1.6, which is part of the JDK1.6 distribution now. It has two approaches: 1. Define a service interface and apply the @WebService on the interf ...
the idea is to the EJB3.1 @Asynchronous ejbs screen shot 1: call async ejb without receiving a result screen shot 2: call async ejb and get a result the jsf page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-tran ...
This tests the ejb3.1 annotation @Schedule. The idea is to print the server time regularly, in a scheduled task method. package com.jxee.ejb.test.singleton; import java.util.Date; import javax.annotation.PostConstruct; import javax.ejb.Lock; import javax.ejb.LockType; import javax.ejb.Sc ...
The idea of the test is to print the instance of the singleton ejb for different requests. The singleton ejb is referenced in the request scoped backing bean. the screen shot of the test page: the page: "/tst/testSingleton.xhtml" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 ...
The following is a brief list of the new features of EJB3.1 1. no interface required @Stateless public class MyEjb { ...} 2. singleton EJB: @Singleton @Singleton public class MySingleton { ... } 3. timer based services: @Schedule @Stateless public class MyTimerBean { @Schedule(dayOf ...
这题目可能有点儿吓人,但却是实事求是。 我们看看JSF2有哪些方法来获取HTTP GET parameters: 1. use of new JSF tag "f:viewParam". is it ugly? //in the page: <f:metadata> <f:viewParam name="s1" value="#{pt.s1}" /> </f:metadata> //in the bean: ...
Add new/Update/View Details can be combined altogether into one single screen. This results in the CRUD operations to only two screens. The search screen has the "delete" action as the last column of the datatable. Here's the updated search screen(it shows primefaces database pagination at ...
Global site tag (gtag.js) - Google Analytics