jsf-2

Mojarra 2.1.6 not working as expected with OmniFaces FullAjaxExceptionHandler

回眸只為那壹抹淺笑 提交于 2019-12-12 10:17:00
问题 My environment is: JDK 6u31 GlassFish 3.1.2.2 Mojarra 2.1.6 (bundled with GF) PrimeFaces 4.0 OmniFaces 1.6.3 I configured both FacesExceptionFilter and FullAjaxExceptionHandler for my application, and they work fine for all kinds of exceptions, except javax.faces.application.ViewExpiredException . If I invalidate the session and then click a button, the error page for a RuntimeException is shown, after the following exception is thrown: INFO: Session invalidated SEVERE:

Should a composite component really require namingcontainer interface?

夙愿已清 提交于 2019-12-12 10:06:19
问题 I want to create a composite componet that can iterate with others. The problem is that composite componet is a namingcontainer and a simple selectOnMenu change and refresh other selectOnMenu do not is possible because "id" given to selectOnMenu is combo1:combo and can't see combo2:combo . The best situation would be form1:combo1 and form1:combo2 , then, combo1 and combo2 uses uinamingcontainer of h:form . This link talks about this but no solution. https://cwiki.apache.org/MYFACES/create-a

How to display Parent and Child ( two different objects ) in treetable primefaces?

旧街凉风 提交于 2019-12-12 10:02:52
问题 I am using Treetable component to display parent and child objects. I can able to display the parent content by using this tutorial. In my case, I am using two different objects to display the contents in the TreeTable component. Those objects are following. University Detail - It is my parent Object. It contains (Id and Name of each university) as well as child colleges. College Detail - It is my child Object. It contains (Id and Name) of each college. UniversityDetail Class public class

JSF 2 Mojarra and Primefaces in WebSphere 7+

空扰寡人 提交于 2019-12-12 09:49:45
问题 I have been struggling with the unholy alliance that is WebSphere 7+ and Mojarra 2.0.4 and have run into something of a showstopper. I followed the directions as specified at this forum post and got Mojarra 2.0.4 initializing properly: http://forum.primefaces.org/viewtopic.php?f=3&t=6860 Basically I created an isolated classloader shared library that refers externally to the Mojarra and Primefaces jars, added the shared library to the webapp and reversed the classloader to go PARENT_LAST. All

How to show confirm (richfaces) popup when use action Method in JSF Managed Bean?

我只是一个虾纸丫 提交于 2019-12-12 09:27:28
问题 Perhaps we are familiar with the confirm popup in Javascript. However, in this example, I want to create one custom confirm popup based on popupPanel in richFaces that have 2 requirements: I can describe the requirements of the confirm box is as follows: After our application valid data (processed by one action method in ManagedBean), then the custom confirm box appears, and it asks user to confirm insert data to database. Not like when we use window.confirm, confirm box appears after we

@ManagedBean annotation doesnt work, but @Named works

匆匆过客 提交于 2019-12-12 09:19:45
问题 I had some troubles. Class with @Named works: @Named @SessionScoped public class UserBean { @Autowired UserBo userBo; public void setUserBo(UserBo userBo) { this.userBo = userBo; } public String printMsgFromSpring() { return userBo.getMessage(); } } but this is doesnt work and generates error: javax.servlet.ServletException javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) root cause java.lang.NullPointerException com.mkyong.UserBean.printMsgFromSpring(UserBean.java:24)

JSF 2.0 and Facelets

ぐ巨炮叔叔 提交于 2019-12-12 08:56:37
问题 In blogs i have read that JSF 2.0 is inlcuding Facelets. So i only included JSF-api.jar and JSF-impl.jar to my Java build path. But if i try to use Facelet tags, they don't work. Do i need to configure Facelets anywhere or must i include any further libraries? THX. 回答1: It should works fine. More information and working example you can find in IBM developer works article and following articles in this series. 回答2: How to configure/use Facelets is outlined the Java EE 6 tutorial: Developing a

Proper using of Facelet templates & Composite Components

久未见 提交于 2019-12-12 08:47:05
问题 I'm still not sure about proper using of JSF Templates & Composite Components. I need create an enterprise web applications, which will have a lot of pages. Every page will have the same header, menu, footer and of course different content (= JSF template). The content on every pages will consist of reusable "boxes" (= JSF composite components). The boxes consist of some fileds, buttons etc. Is my solution proper? Or should I use other technology like , Custom Components, decorate ...? layout

Facelet tag parameter not recognized by PrimeFaces p:ajax

删除回忆录丶 提交于 2019-12-12 08:43:58
问题 I have a simple Facelet tag: <ui:composition> <ui:insert /> </ui:composition> which is used in order to avoid declaring multiple c:set tags. Let's say I registered it in the facelets taglib library with the name view , and use it like this: <my:view bean="#{myController}"> <p:inputText value="#{bean.value}> <p:ajax event="blur" process="@this" listener="#{bean.handleValueChanged}" /> </p:inputText> </my:view> The attribute value is perfectly resolved by p:inputText , but p:ajax throws this:

JSF: How validate fields and return error messages by bean validation?

坚强是说给别人听的谎言 提交于 2019-12-12 08:43:25
问题 I have a contact form and I have some fields that are validated by bean validation, how could I return bean validation error messages after submitting? For example: <h:form> <h:inputText id="name" value="#{contact.client.name}"></h:inputText>Name (Required) <h:inputText id="email" value="#{contact.client.email}"></h:inputText>E-Mail (Required) <h:inputText id="website" value="#{contact.client.website}"></h:inputText>Website (Optional) <h:inputText id="text" value="#{contact.client.text}"></h