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) < [email protected]>: > > [ > 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} > > <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) >
