-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ID of composite component gets initialized early without parent IDs when it's referenced in f:ajax execute attribute #5415
Milestone
Comments
OK, this is regression of jakartaee/faces#1567 Work around for now, use |
BalusC
added a commit
to jakartaee/faces
that referenced
this issue
Mar 16, 2024
arjantijms
added a commit
that referenced
this issue
Mar 17, 2024
#5415: move retargeted client ID calculation from AjaxHandler to AjaxBehaviorRenderer so it doesn't fail when cc.clientId happens to be referenced in f:ajax execute
arjantijms
added a commit
to jakartaee/faces
that referenced
this issue
Mar 17, 2024
pizzi80
added a commit
to pizzi80/mojarra
that referenced
this issue
Mar 25, 2024
+ eclipse-ee4j#5415: move retargeted client ID calculation from AjaxHandler to AjaxBehaviorRenderer so it doesn't fail when cc.clientId happens to be referenced in f:ajax execute Signed-off-by: pizzi80 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Accessing the clientId of a composite component can be initialized early in its lifecycle when referencing it in a f:ajax execute. This early initialization will prevent the component to being aware of its parents and can therefore cause duplicate ID errors.
To Reproduce
I've attached a sample application DemoDuplicateComponentBug.zip. Here is the code of the involved components of the sample application:
index.xhtml
outerComponent.xhtml
middleComponent.xhtml
innerComponent.xhtml
Running this on the newest Wildfly 31.0.1.Final and opening http://localhost:8080/web-application/ will result in a duplicate component ID error of "middleComponentInOuterComponent". Referencing the
cc.clientId
in any other way will not cause this error. Here is the Stacktrace (sorry for the german error output):Expected behavior
Expected behavior is the rendering of two components with the IDs
contentForm:firstInstanceOfOuterComponent:middleComponentInOuterComponent:j_idt2:input
andcontentForm:firstInstanceOfOuterComponent:middleComponentInOuterComponent:j_idt5:input
or similar chained IDs.Environment:
To modify the attached reproducer for Wildfly versions before 27 simply replace the jakarta with javax of the Faces Servlet in the web.xml.
The text was updated successfully, but these errors were encountered: