Validation error with different result in PF 11 and PF 14 #3423
-
Hello. xhtml-page: <!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:h="jakarta.faces.html" xmlns:f="jakarta.faces.core" xmlns:ui="jakarta.faces.facelets" xmlns:p="http://primefaces.org/ui"
xmlns:c="jakarta.tags.core">
<h:head>
<title>PF Validation Problem</title>
</h:head>
<h:body id="body">
<h:form id="baseForm">
<p></p>
<p:commandButton process="@this" title="open dialog" update="carId" onclick="PF('dlgIdWidget').show();" />
<p:dialog id="dlgId" widgetVar="dlgIdWidget" header="Test- dialog" modal="true" closeOnEscape="true">
<p></p>
<p:outputLabel value="Car: " for="@next" />
<p:inputText id="carId" value="#{testView.car}" required="true" />
<p></p>
<p:commandButton id="cancelId" value="Cancel"
action="#{testView.pbCancel()}"
onclick="PF('dlgIdWidget').hide(); return false;"
process="@this" immediate="true" ajax="false" icon="pi pi-times" />
<p:commandButton id="saveId" value="OK"
action="#{testView.pbOK()}" update="@none" process="@this dlgId" icon="pi pi-save" />
<p></p>
<p:messages>
<p:autoUpdate />
</p:messages>
<p:growl>
<p:autoUpdate />
</p:growl>
</p:dialog>
</h:form>
</h:body>
</html> bean: public class TestView implements Serializable
{
private static final long serialVersionUID = 4290918565613185179L;
private String car = new String();
@PostConstruct
public void initializeView()
{
car = "LADA TAIGA";
System.out.println("initializeView() => car: " + car);
}
public void pbOK()
{
System.out.println("pbOK() => car: " + car);
}
public void pbCancel()
{
System.out.println("pbCancel() => car: " + car);
}
public String getCar()
{
return car;
public void setCar(String car)
{
this.car = car;
}
} web.xml: <context-param>
<param-name>primefaces.RESET_VALUES</param-name>
<param-value>false</param-value>
</context-param> What we tried: it works with some sideeffects:
INFO: Has anyone an idea or a solution for our problem? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I typically use And have never had an issue. However if you feel it is a bug ....please provide an executable example using the PrimeFaces Test project. |
Beta Was this translation helpful? Give feedback.
-
what exactly does it now mean for us? we have to wait for mojarra 5.0? we have to upgrade to the next release until 2nd quartal of year (using JBOSS 8.0.5 with Mojarra 4.0.7.redhat-00001 right now. |
Beta Was this translation helpful? Give feedback.
See primefaces/primefaces#12710
should be fixed in Mojarra 4.0.9