[ 
https://issues.apache.org/jira/browse/MYFACES-4511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17641202#comment-17641202
 ] 

Werner Punz commented on MYFACES-4511:
--------------------------------------

Found a deviation and a something which might need t tck test bug report:

A) The deviation is that the RI adds the NamingContainerId to head

I did a lookup in a site which uses the RI after checking the TCK:

{code:xml}

<head id="j_idt2">

{code}

 

In the TCK this is marked as:

{code:java}

page.getHead().getId().split("(?<=:)", 2)[0];

{code}

 

We do not have this behavior, I have not looked up the spec whether this is ri 
behavior something from the specfication we might have missed.

Another weird thing:

{code:java}

HtmlInput form1ViewState = (HtmlInput) 
form1.getInputByName(namingContainerPrefix + "jakarta.faces.ViewState");

{code}

As in the RI behavior and ours the name is statically bound to 
"jakarta.faces.ViewState" and only the id is dynamic with 

{code:xml}

<naming container>:<jakarta.faces.ViewState>:<unique number>

{code}

Anything else does not really make sense because we do not have multiple 
viewstates per form.

I am not aware that this has changed and the name suddenly is dynamic. But I 
will run later the tck and check the html output. I might have missed something 
here.

 

 

 

> TCK: Spec790: Manual faces.ajax.request() call fails to send correct response 
> ------------------------------------------------------------------------------
>
>                 Key: MYFACES-4511
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4511
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.15, 2.3.10, 2.3-next-M7, 4.0.0-RC2
>            Reporter: Volodymyr Siedlecki
>            Assignee: Werner Punz
>            Priority: Major
>         Attachments: test-faces23-cdi.war
>
>
> For this TCK application (see github and the attached),  the manual ajax 
> request fails.
> URL: localhost:port/namespacedView/spec790WithNamespacedView.xhtml
> MyFaces Output:{{{{}}{}}}
> {noformat}
> <?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>{noformat}
> {{}}
> Mojarra Output:
> {noformat}
> <?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>{noformat}
> 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:
> {code:java}
> jakarta.faces.partial.render    ":panel1 :panel2"{code}
> Mojarra:
> {code:java}
> j_id1:jakarta.faces.partial.render    "j_id1:panel1 j_id1:panel2"{code}
> See the Facelet code here: 
> [https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/spec790WithNamespacedView.xhtml#L43-L44]
>  
> Test Code: 
> [https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L74]
> Background Issue: [https://github.com/jakartaee/faces/issues/790]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to