Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.15, 2.3.10, 2.3-next-M7, 4.0.0-RC2
-
None
-
None
Description
For this TCK application (see github and the attached), the manual ajax request fails.
URL: localhost:port/namespacedView/spec790WithNamespacedView.xhtml
MyFaces Output:{}
<?xml version="1.0" encoding="UTF-8"?> <partial-response id="j_id__v_0"> <changes> <update id="j_id__v_0:jakarta.faces.ViewState:1"> <![CDATA[ZWZkYjAyMGViZWRhZjZmYzAwMDAwMDAy]]> </update> </changes> </partial-response>
{{}}
Mojarra Output:
<?xml version='1.0' encoding='UTF-8'?> <partial-response id="j_id1"> <changes> <update id="j_id1:panel1"> <![CDATA[<div id="j_id1:panel1"> <form id="j_id1:form1" name="j_id1:form1" method="post" action="/namespacedView/spec790WithNamespacedView.xhtml" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="j_id1:form1" value="j_id1:form1" /> <input id="j_id1:form1:button" type="submit" name="j_id1:form1:button" value="submit form1 and render panel2 and panel3 using h:commandButton f:ajax" onclick="mojarra.ab(this,event,'action','j_id1:form1','j_id1:panel2 j_id1:panel3');return false" /> </form></div>]]> </update> <update id="j_id1:panel2"> <![CDATA[<div id="j_id1:panel2"> <form id="j_id1:form2" name="j_id1:form2" method="post" action="/namespacedView/spec790WithNamespacedView.xhtml" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="j_id1:form2" value="j_id1:form2" /> <a id="j_id1:form2:link" href="#" onclick="mojarra.ab(this,event,'action','j_id1:form2','j_id1:panel1 j_id1:panel3');return false">submit form2 and render panel1 and panel3 using h:commandLink f:ajax</a> </form></div>]]> </update> <update id="j_id1:jakarta.faces.ViewState:0"> <![CDATA[-6784505207945273947:-8354726413445019164]]> </update> </changes> </partial-response>
My initial investigation leads me to believe its' because of what is sent in the form. MyFaces uses the input directly, but Mojarra looks to update to the full id when creating the request.
MyFaces:
jakarta.faces.partial.render ":panel1 :panel2"
Mojarra:
j_id1:jakarta.faces.partial.render "j_id1:panel1 j_id1:panel2"
See the Facelet code here: https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/spec790WithNamespacedView.xhtml#L43-L44
Background Issue: https://github.com/jakartaee/faces/issues/790