[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2022-12-15 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

https://github.com/apache/myfaces/blob/93a47f3c78716f0ff3c01227ee1cd5972aeb965b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java#L124

^ where name is written

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2022-12-21 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

The test maybe wrong here... prefixing the name might not even be needed and 
raises some issues maybe on the java side.

I dont think the name in the viewstate should be prefixed at all, unless there 
is something in the spec clearly stating that.

The JSDoc clearly does not want a prefix for the ajax xhr post case)

(see comments on the pull request: https://github.com/apache/myfaces/pull/435)

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Thomas Andraschko (Jira)


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

Thomas Andraschko commented on MYFACES-4533:


[~werpu] can you check how its implemented and specified and take care of it?


> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I will take over it tomorrow.

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

I though we would challenge part of the test based on your post here: 
[https://github.com/apache/myfaces/pull/435#issuecomment-1360961968]

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Yes I need to get everything together on this issue, the test already passes 
with the fixes I did in this area, however, we have a discrepancy on how we 
render the initial name. Mojarra prefixes the naming container initially in the 
name, while we do not, I do not think doing that is necessary for the reasons I 
stated in the comment from a few weeks ago, but maybe it is something we have 
to follow to get a unified behavior.

I need to get together all the info also for the server side, to get the full 
picture here. 

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

Yes, I tried to prefix the name with the container id here: 
[https://github.com/apache/myfaces/pull/435/files#diff-caf34c8854dfe9d2b267509188e349cde623bd63db49a279f224c99511297e58R127-R139]

However, I don't see MyFaces updating the name attribute in the prefix via 
JavaScript after an ajax response.

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-18 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Yes thats on my plate now... I will merge your fixes with mine, and then lets 
see where this leads.

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-19 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Ok I did quickly all the needed changes on my 4466 branch where I host the new 
version of the scripts, the tests pass with my changes on the client side, and 
the changes on the server side.

However one test still fails, the navigational case  public void 
testSpec790WithNamespacedViewAjaxNavigation() which passes without naming 
container:

 
following construct does not seem to trigger the navigation but still reissues 
the same page in the namespaced case (non namespaced it works)

{code:xml}



{code}
 
The request seems correct to me, for safety reasons atm I pass the 
:jakarta.faces.ViewState as well as jakarta.faces.ViewState 
in the request.
But on the bachend side the navigation does not seem to be triggered.

Any idea which class is responsible for triggering the backend navigation here, 
so that I can have a deeper look?



> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-19 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I have everything except the named  nav case working now, which I have not yet 
had time to debug into.
However I noticed one thing. In @volosied s patch, there is an extra attribute 
introduced into the process-response named
namedResponse

This is an extra attribute. The problem is you basically need this attribute 
otherwise you do not have any chance to determine whether you are in a naming 
container scenario.

The initially rendered html is following:
{code:html}
http://www.w3.org/1999/xhtml";>

JAVASERVERFACES_SPEC_PUBLIC-790 - Integration Test - Namespaced 
View






{code}

Now this clearly is a naming container scenario from the backend, the names are 
properly prefixed
and also the process response has the id="j_id__v_0"

However in the non naming container test we have a similar rendering, same id 
in the process response but the main difference is the names of the viewState 
elements:
{code:html}
http://www.w3.org/1999/xhtml";>

JAVASERVERFACES_SPEC_PUBLIC-790 - Integration Test






{code}

So we have two options now in the response xml the main difference is that 
myfaces sets the namedResponse is set to false.
Now, namedResponse is not standard and an extra attribute, hence breaks the 
spec.
There might be another option on the client side, we can check whether any 
existing viewstate element has the prefix named, then we know we have a named 
container!
I would prefer the second option which does not change the protocol and should 
work on both implementations!


> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-19 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I have added my current state 
https://github.com/werpu/myfaces/tree/feature/MYFACES-4466-TCK790 you can fork 
away from there from further research.
The code uses the new ajax codebase and is also based on master for the rest.
The TCK passes, however the navigational test of the Namespaced TCK fails. I 
tried to debug into it and it seems like the Nav Handler not called and the 
original page is returned.
If you have time please debug further in.
Also i have eliminated the namedResponse attribute as it is non standard and 
solved it with a dom pattern match.
I am now out of work, if someone overseas wants to take over for the next step 
(debugging out why the navigation fails, please feel free)
Once we have everything working in the new codebase I will backport the fix to 
the old code!


> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-19 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

Thanks for your work on this! I looked into your branch, and I noticed that the 
the jakarta.faces.viewstate attribute is sent with the prefix (within the form 
data).

This causes our isPostBack check to fail as we only check for 
`jakarta.faces.ViewState`, not `j_id__v_0:jakarta.faces.ViewState`.



Other things I noticed about the form data: 
Two view states are  sent?
{code:java}
j_id__v_0:jakarta.faces.ViewState    […]
0    "NDQ0MzI2MjIwMWRiNzBhNDAwMDAwMDBm"
1    "NDQ0MzI2MjIwMWRiNzBhNDAwMDAwMDBm"{code}


jakarta.faces.partial.execute    "{*}j_id__v_0:form j_id__v_0:form:button{*}" 
is different. Previously, we only sent
{noformat}
jakarta.faces.partial.execute    "j_id__v_0:form"{noformat}

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-19 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

viewRoot is null at this point, so we would need another way to get the 
container id prefix here.

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-20 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Thanks for the analysis, yes the postback is slightly different, the 
specification is quite unclear on this, in one section of the jsdoc it talks 
about sending the raw jakarta.faces.ViewState always and in a later section 
talks about having to prefix every parameter you send down in the 
namingContainer case.
I thought to have sent the prefixed one and the non prefixed one for now.

as for the execute, having sent the button id is correct, because execute 
originally was sent as @this which means the originating component, which in 
this case was/is the button.
I have to check whether not sending the button id still exists in the old 
codebase, if yes then it is a bug!

{code:xml}

  

{code}

Here you can see the navigational trigger with the @this 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-20 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I just ran the test against mojarra here is the result

 {code:json}

j_id1:form1=j_id1:form1
j_id1:jakarta.faces.ViewState=5807784481578067120:-3902354252644387665
j_id1:jakarta.faces.source=j_id1:form1:button
j_id1:jakarta.faces.partial.event=click
j_id1:jakarta.faces.partial.execute=j_id1:form1:button j_id1:form1
j_id1:jakarta.faces.partial.render=j_id1:panel2 j_id1:panel3
j_id1:jakarta.faces.behavior.event=action
j_id1:jakarta.faces.partial.ajax=true

{code}

 Ok they basically prefixed everything except for the non standard 
j_id1:form1=j_id1:form1 (which I had to take in to keep mojarra compatibility 
with my implementation)

So this means... in case of a naming container we really have to prefix 
everything, and also
the execute has the button in its cycle independent of being part of the 
executes list because it is the source!

(So I dont have to change anything there)
I will adapt the rest accordingly, it is only about execute etc.. anyway, but 
we have to change our server side implementation so that they trigger properly 
on the prefixed naming container parameters!)


 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-20 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

Thanks [~werpu]  - i appreciate your persistence here ;) 

We're down to just a handful of failures now (with your selenium PR)!

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-20 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

The server side part is still missing on this one, we probably have to take the 
into consideration that all standard jakarta namespaced parameters are prefixed 
not only the viewstate.
If anyone wants to take this task over, I can merge everything then together 
and put it into the other branches once working.


> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-23 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Hi... the double request parameter is now fixed in my special branch.

However I tried to enable the navigation by adding the prefixes in the rest of 
the ResponseStateManager,

but it is not working yet. My assumption is that when the initial state might 
be created the naming container prefix is not yet present, but that is just a 
hunch from my side.

I am not so deep into the impl to really know what the root cause could be, it 
definitely has to do with the ViewState though.

[https://gist.github.com/werpu/4844714e8c3d416ad8e57607be1eb376]

Here is the code for the update state manager

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-24 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I have provided a backport into the old codebase under 
[https://github.com/apache/myfaces/pull/502] please do not merge this yet into 
main until the server side implementation has been adapted.

You can use it for the implementation though, the TCK 790 passes with it except 
for the navigation, just like in the new one!

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-24 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I have added a pr for main now which adds the fixes from to the old codebase, 
you can use it for the server side as well: 
[https://github.com/apache/myfaces/pull/502]

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-24 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

Working on a few other things right now, but I'll try to look at this later in 
the week.

If I can't get it, maybe let's challenge this prefix part of the test.  Thanks 
again for your work here!

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-24 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

No worries, I will be assigned to a new project, so my time in the future will 
be more limited. So take your time and dont stress yourself out.

Maybe we still can ping Leonardo Uribe, who was the original implementor if no 
one of us can figure it out!

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-30 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Hi... sorry, for being absent, but I had to help out in another project for a 
few days... any news on the issue?

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-30 Thread Volodymyr Siedlecki (Jira)


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

Volodymyr Siedlecki commented on MYFACES-4533:
--

Hi, not yet. I focused on a few other things (including MYFACES-4553).

But I think we're basically down to just this JIRA & MYFACES-4553 for us to 
pass the TCK (excluding all the ajax / HTMLUnit problems which shouldn't be an 
issue now with you selenium PR and our team is working to update the old  tck 
to newer HTMLUnit libraries to avoid ajax issues there)

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-30 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

I will have another look at the server implementation tomorrow, maybe I can 
figure the missing part out.

We are so close, I probably just have missed a minor thing, to get it right on 
the server.

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-31 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

Test Results with my patches in:

Faces22 / ajax

!image-2023-01-31-13-48-30-884.png|width=341,height=128!

This is a known issue and reported!

Faces23 Ajax:

!image-2023-01-31-13-54-59-301.png|width=374,height=89!

Namespaces (this is the test failing before):

!image-2023-01-31-13-52-23-736.png|width=386,height=92!

And 4.0 Ajax

!image-2023-01-31-13-53-24-862.png|width=382,height=91!

 

I will provide the fixes in my special 790 branch for review... Once everyone 
is ok with it, I will start to merge and backport down into the other branches!

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, image-2023-01-31-10-55-59-105.png, 
> image-2023-01-31-13-48-30-884.png, image-2023-01-31-13-49-04-491.png, 
> image-2023-01-31-13-52-23-736.png, image-2023-01-31-13-53-24-862.png, 
> image-2023-01-31-13-54-59-301.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


[jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-31 Thread Werner Punz (Jira)


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

Werner Punz commented on MYFACES-4533:
--

[https://github.com/werpu/myfaces/commit/f89a1bbdecc8e192f92de3d5de875b748c6427d9]
 here is the main commit for the server side:

Short explanation:

 

The class 

ParamsNamingContainerResolver does the heavy lifting, it basically provides a 
set of naming container resolution methods and wraps itself around as facade on 
top of the params map.

Every time a key now is accessed int the params map, it checks whether a 
prefixed (in case of a naming container case) key is preset

and if not it also checks for a normal key (which can be dropped in the future, 
this is just a safety fallback)

The rest if the changes mostly revolved around replacing a direct paramsMap 
access with the access of the resolver indirection!

 

There is some optimization potential: 

a) I noticed that we even in the old code had an isPostBack check which checks 
for a ViewState being present in the params map. 

The question is, is this necessary, given the FacesContext has an independent 
isPostBack method which does not trigger the one in the HTMLResponseStateManager

b) The naming container resolution has to be done independent of UIViewRoot 
because it happens sometimes at stages where there is no UIViewRoot. I applied 
the same technique as in the client by checking for prefixes on the ViewState 
param.

But this access is not yet puffered, again, a small optimization would be to 
puffer/cache it on request level, whenever possible.

(we run a stream against the request params here checking for the first 
ViewState element being present, not good)

 

> TCK: Spec 790:  Viewstate input element's name attribute should be prefixed 
> with naming container id 
> -
>
> Key: MYFACES-4533
> URL: https://issues.apache.org/jira/browse/MYFACES-4533
> Project: MyFaces Core
>  Issue Type: Bug
>Affects Versions: 4.0.0-RC2
>Reporter: Volodymyr Siedlecki
>Assignee: Werner Punz
>Priority: Major
> Attachments: image-2023-01-19-08-44-48-874.png, 
> image-2023-01-19-08-48-12-961.png, image-2023-01-31-10-55-59-105.png, 
> image-2023-01-31-13-48-30-884.png, image-2023-01-31-13-49-04-491.png, 
> image-2023-01-31-13-52-23-736.png, image-2023-01-31-13-53-24-862.png, 
> image-2023-01-31-13-54-59-301.png, namespacedView.war
>
>
> Failing Line: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>  5
> Generated Viewstate: 
> {code:java}
>  id="j_id__v_0:jakarta.faces.ViewState:1" 
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> {code}
> The test expects the name attribute to be prefixed with `j_id__v_0`.  My 
> understanding is this should only apply when the view root is an instance of 
> a NamingContainer.   
> The test app's faces-config has the following configuration: 
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28



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


Re: [jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-17 Thread Werner Punz
Yes atm only the id is updated in the js not the name. However in the new
codebase (I have to check the old whether I did the same) it is taken into
consideration that the name also can be prefixed!
Prefixing the name is a 2 liner, but I kept it deliberately out just not to
break anything until the server side implements it.
It basically just is that you have to replicate the id more or less into
the name (not sure if the counter at the end of the id in a multi form
scenario is replicated as well, as I wrote before, the specs are very
unclear on the name handling regarding prefix and postfixes, but only want
for instance jakarta.faces.ViewState in the request as parameter, hence my
idea to challenge the name prefixing altogether for clearance.

I will todayl try to gather all the information we have on this topic and
then either write a challenge or fix it on our side.




Am Di., 17. Jan. 2023 um 21:14 Uhr schrieb Volodymyr Siedlecki (Jira) <
dev@myfaces.apache.org>:

>
> [
> https://issues.apache.org/jira/browse/MYFACES-4533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17677963#comment-17677963
> ]
>
> Volodymyr Siedlecki commented on MYFACES-4533:
> --
>
> Yes, I tried to prefix the name with the container id here: [
> https://github.com/apache/myfaces/pull/435/files#diff-caf34c8854dfe9d2b267509188e349cde623bd63db49a279f224c99511297e58R127-R139
> ]
>
> However, I don't see MyFaces updating the name attribute in the prefix via
> JavaScript after an ajax response.
>
> > TCK: Spec 790:  Viewstate input element's name attribute should be
> prefixed with naming container id
> >
> -
> >
> > Key: MYFACES-4533
> > URL: https://issues.apache.org/jira/browse/MYFACES-4533
> > Project: MyFaces Core
> >  Issue Type: Bug
> >Affects Versions: 4.0.0-RC2
> >Reporter: Volodymyr Siedlecki
> >Assignee: Werner Punz
> >Priority: Major
> > Attachments: namespacedView.war
> >
> >
> > Failing Line:
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
> 5
> > Generated Viewstate:
> > {code:java}
> >  id="j_id__v_0:jakarta.faces.ViewState:1"
> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
> > {code}
> > The test expects the name attribute to be prefixed with `j_id__v_0`.  My
> understanding is this should only apply when the view root is an instance
> of a NamingContainer.
> > The test app's faces-config has the following configuration:
> >
> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28
>
>
>
> --
> This message was sent by Atlassian Jira
> (v8.20.10#820010)
>


Re: [jira] [Commented] (MYFACES-4533) TCK: Spec 790: Viewstate input element's name attribute should be prefixed with naming container id

2023-01-18 Thread Werner Punz
So after digging through the docs it is a little bit clearer, I missed a
second section in the JSDocs, however they need some overhaul:

Here are the sections affecting everything:
 https://jakarta.ee/specifications/faces/4.0/jsdoc/faces.ajax.html

 If the ID of the jakarta.faces.ViewState element has a
 prefix, where  is the currently
configured UINamingContainer.getSeparatorChar() and
 is the return from
UIViewRoot.getContainerClientId() on the view from whence this state
originated, then remember it as namespace prefix. This is needed during
encoding of the set of post data arguments.


* Encode the set of post data arguments. If the jakarta.faces.ViewState
element has a namespace prefix, then make sure that all post data arguments
are prefixed with this namespace prefix.*


While the rest of the documentation talks about sending the raw
jakarta.faces.ViewState

I think it makes sense to prefix it if present always, which means also
adding it to the name, just like mojarra does!
I will to start to work on this, except a pull request tomorrow.



Am Mi., 18. Jan. 2023 um 07:27 Uhr schrieb Werner Punz <
werner.p...@gmail.com>:

> Yes atm only the id is updated in the js not the name. However in the new
> codebase (I have to check the old whether I did the same) it is taken into
> consideration that the name also can be prefixed!
> Prefixing the name is a 2 liner, but I kept it deliberately out just not
> to break anything until the server side implements it.
> It basically just is that you have to replicate the id more or less into
> the name (not sure if the counter at the end of the id in a multi form
> scenario is replicated as well, as I wrote before, the specs are very
> unclear on the name handling regarding prefix and postfixes, but only want
> for instance jakarta.faces.ViewState in the request as parameter, hence my
> idea to challenge the name prefixing altogether for clearance.
>
> I will todayl try to gather all the information we have on this topic and
> then either write a challenge or fix it on our side.
>
>
>
>
> Am Di., 17. Jan. 2023 um 21:14 Uhr schrieb Volodymyr Siedlecki (Jira) <
> dev@myfaces.apache.org>:
>
>>
>> [
>> https://issues.apache.org/jira/browse/MYFACES-4533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17677963#comment-17677963
>> ]
>>
>> Volodymyr Siedlecki commented on MYFACES-4533:
>> --
>>
>> Yes, I tried to prefix the name with the container id here: [
>> https://github.com/apache/myfaces/pull/435/files#diff-caf34c8854dfe9d2b267509188e349cde623bd63db49a279f224c99511297e58R127-R139
>> ]
>>
>> However, I don't see MyFaces updating the name attribute in the prefix
>> via JavaScript after an ajax response.
>>
>> > TCK: Spec 790:  Viewstate input element's name attribute should be
>> prefixed with naming container id
>> >
>> -
>> >
>> > Key: MYFACES-4533
>> > URL: https://issues.apache.org/jira/browse/MYFACES-4533
>> > Project: MyFaces Core
>> >  Issue Type: Bug
>> >Affects Versions: 4.0.0-RC2
>> >Reporter: Volodymyr Siedlecki
>> >Assignee: Werner Punz
>> >Priority: Major
>> > Attachments: namespacedView.war
>> >
>> >
>> > Failing Line:
>> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/test/java/ee/jakarta/tck/faces/test/javaee8/namespacedView/Spec790WithNamespacedViewIT.java#L15
>> 5
>> > Generated Viewstate:
>> > {code:java}
>> > > id="j_id__v_0:jakarta.faces.ViewState:1"
>> value="NzVhMDlkOGYwNjY1ZWZkODAwMDAwMDAy" autocomplete="off">
>> > {code}
>> > The test expects the name attribute to be prefixed with `j_id__v_0`.
>> My understanding is this should only apply when the view root is an
>> instance of a NamingContainer.
>> > The test app's faces-config has the following configuration:
>> >
>> https://github.com/jakartaee/faces/blob/master/tck/faces23/namespacedView/src/main/webapp/WEB-INF/faces-config.xml#L25-L28
>>
>>
>>
>> --
>> This message was sent by Atlassian Jira
>> (v8.20.10#820010)
>>
>