Jonathan S. Fisher created MYFACES-4771:
-------------------------------------------

             Summary: Regression 2.3.10 -> 2.3.11
                 Key: MYFACES-4771
                 URL: https://issues.apache.org/jira/browse/MYFACES-4771
             Project: MyFaces Core
          Issue Type: Bug
          Components: General
    Affects Versions: 2.3.12, 2.3.11
            Reporter: Jonathan S. Fisher


Ajax render/execute ids wrongly prefixed with form's naming container (2.3.11+)

Since f7e0547 (MYFACES-4538), _transformList runs every render/execute id 
through _remapNamingContainer. Without a namespaced view root, every id the 
server resolved gets the prefix of the form's nearest naming container.

To Reproduce: put an h:form inside composite "comp" has <f:ajax 
render=":target"/>. The server renders render:'target'. 2.3.10 posts "target", 
and 2.3.11+ posts "comp:target". The update is skipped silently.

The server already strips the leading ":", so the client cannot tell absolute 
ids from relative ids. With rootNamingContainerId == "", the absolute check 
never matches.

Fix: return the elements unchanged when rootNamingContainerId is empty. A 
namespaced view is unaffected, because its ids carry the root prefix and 
already pass through unchanged.

{code:javascript}
if (!rootNamingContainerId) {
    return elements;
}
{code}

I'll open a PR on github shortly. Tested on 2.3.13-SNAPSHOT and solves the 
problem.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to