mojarra

Is this Primefaces bug or Mojarra/MyFaces bug

南楼画角 提交于 2019-12-02 08:55:43
I cannot seems to be able to fire an event when I am within column of dataTable . Here is my simple demostration <h:form id="form"> <!--This section of p:tree here seems to be the reason causing the event not fired when click the command button--> <p:tree value="#{viewBean.root}" var="node" dynamic="true" cache="false" selectionMode="checkbox" selection="#{treeBean.selectedNode}"> <p:ajax event="expand" update=":form:messages" listener="#{viewBean.onNodeExpand}" /> <p:ajax event="collapse" update=":form:messages" listener="#{viewBean.onNodeCollapse}" /> <p:ajax event="select" update=":form

When does JSF creates a session & what does it puts in a session map?

穿精又带淫゛_ 提交于 2019-12-02 06:31:35
I am running Mojarra 2.2.0. <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> The managed bean action method is- public void action() { HttpSession session = (HttpSession) FacesContext.getCurrentInstance() .getExternalContext().getSession(false); System.out.println(session.getId()); // not null for stateful views } For stateless views session.getId() throws NPE For views which are not stateless- Firing a GET request, there is JSESSIONID=340041C96D5AA446D761C3602F54A76D I read it here that- For client side state saving

h:selectOneMenu required=“true” reverts to bean value on validation failure

核能气质少年 提交于 2019-12-02 06:05:38
I have something like this on a create/edit form: <h:selectOneMenu value="#{bean.value}" required="true" ... > <f:selectItem itemLabel="-- Select --" itemValue=""/> <f:selectItems .../> </h:selectOneMenu> In the create new object case, the required validation works as expected. In the edit object case, if I change a valid value to the placeholder "-- Select --", I get the validation failure w/expected requiredMessage because itemValue is blank (""); however , the HTML <select> reverts to whatever option was already selected from the bean, rather than retaining the invalid user input from form

Problem with h:form and p:ajax (Mojarra 2.0.2 and Primefaces 2.0.2)

痴心易碎 提交于 2019-12-02 04:46:25
I have got this site: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui"> <h:head></h:head> <h:body> <h:form id="form-some"> <h:inputText id="copingFilePhaseFocus"> <p:ajax event="focus" actionListener="#{installationController.startCopyingWarFile}" /> </h:inputText> </h:form> </h:body> </html> And backing bean:

Problems configuring JSF 2.0 on Eclipse Indigo

为君一笑 提交于 2019-12-01 18:10:21
I'm developing a web application with JSF 2.0 on the IDE Eclipse Indigo (the last version). But on Project ->Properties -> Project Facets , the option JavaServer Faces is configured on version 1.2 and when I try to change the version to 2.0, an error message apears Cannot change version of project facet JavaServer Faces to 2.0. Strangely, the JSF libaries in my project are all the 2.0 version. I think this is the problem that is causing my pages not to show simple xhtml tags like <h:outputLabel> and <h:inputText> . The JSF libraries that I'm using was obtained on the Mojarra project 2.0.6 Hope

Problems configuring JSF 2.0 on Eclipse Indigo

让人想犯罪 __ 提交于 2019-12-01 17:29:13
问题 I'm developing a web application with JSF 2.0 on the IDE Eclipse Indigo (the last version). But on Project ->Properties -> Project Facets , the option JavaServer Faces is configured on version 1.2 and when I try to change the version to 2.0, an error message apears Cannot change version of project facet JavaServer Faces to 2.0. Strangely, the JSF libaries in my project are all the 2.0 version. I think this is the problem that is causing my pages not to show simple xhtml tags like <h

ActionListener is called multiple times (Bug?) - Mojarra 2.1.3

≯℡__Kan透↙ 提交于 2019-12-01 11:11:18
I have the following button: <h:commandButton disabled="#{mybean.searching}" binding="#{mybean.searchButton}" actionListener="#{mybean.searchForLicenses}" value="Search" /> When I debug I see that the actionListener is called twice first, then three times, next click four times and so on. It seems like on every reload the actionListener is registered one more time. I'm using Mojarra 2.1.3 (also tried 2.0.6) and Tomcat 7 with IceFaces. The binding is done that way: private javax.faces.component.UICommand searchButton; public void setSearchButton(UICommand searchButton) { this.searchButton =

ActionListener is called multiple times (Bug?) - Mojarra 2.1.3

和自甴很熟 提交于 2019-12-01 08:53:17
问题 I have the following button: <h:commandButton disabled="#{mybean.searching}" binding="#{mybean.searchButton}" actionListener="#{mybean.searchForLicenses}" value="Search" /> When I debug I see that the actionListener is called twice first, then three times, next click four times and so on. It seems like on every reload the actionListener is registered one more time. I'm using Mojarra 2.1.3 (also tried 2.0.6) and Tomcat 7 with IceFaces. The binding is done that way: private javax.faces

Multiple browser tabs or windows with the same ViewScoped bean class

你离开我真会死。 提交于 2019-12-01 08:20:41
问题 Using Payara Server 4.1.2.174 with mojarra 2.2.15. I have a simple Named Bean with scope javax.faces.view.ViewScoped. import java.io.Serializable; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.PostConstruct; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class SimpleBean implements Serializable { private final Logger logger = Logger.getLogger(SimpleBean.class.getName()); @PostConstruct private void init() {

JSF: Mojarra 2.1 to 2.2 migration causing ViewExpiredException

两盒软妹~` 提交于 2019-12-01 06:12:29
问题 I'm porting my applications from PrimeFaces 3.5.18 + Mojarra 2.1.26 to PrimeFaces 4.0.2 + Mojarra 2.2.4. When I restart the server I get a ViewExpiredException. Server log contains this: ERROR: MAC did not verify! I know that by default MyFaces generates a random secret to encode the view state, so each time the server restart, a new random secret is generated. Is Mojarra 2.2 behaving the same way? In that case, what context parameters do I need to set? Googling for Mojarra 2.2 context