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

Werner Punz edited comment on MYFACES-4533 at 1/31/23 12:33 PM:
----------------------------------------------------------------

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.

—

Reedit: I got one step closer, it seems the action is not called on the 
submitting button.

Probably a bug in the codebase which ignores the naming container itself in the 
submitted name.

Seems like the ViewRoot buildup fails to do its job... 

—

Well it seems we have many places where the params map is accessed with 
unmapped keys. The best bet is to search for both...

We probably have to introduce some kind of resolver/mapper on top of the params 
map which does this automatically, so that we have a central point to do it 
instead of altering 15 classes to do it!

---

And that was it, I have introduced this mapper, and suddenly the test passes.

Thing is, for now I do it dynamically, in case of a namespaced case I look for 
both the normal key and the namespaced one. The one which matches (with the 
namespaced having higher priority is the one which gets chosen.

We can alter that in the long run, patch is coming soon!

 


was (Author: werpu):
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.

—

Reedit: I got one step closer, it seems the action is not called on the 
submitting button.

Probably a bug in the codebase which ignores the naming container itself in the 
submitted name.

Seems like the ViewRoot buildup fails to do its job... 

---

Well it seems we have many places where the params map is accessed with 
unmapped keys. The best bet is to search for both...

We probably have to introduce some kind of resolver/mapper on top of the params 
map which does this automatically, so that we have a central point to do it 
instead of altering 15 classes to do 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: 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, 
> 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}
> <input type="hidden" name="jakarta.faces.ViewState" 
> 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)

Reply via email to