-
Notifications
You must be signed in to change notification settings - Fork 107
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
UIRepeat: Improve detection of repeating parents #4957
Comments
Thanks for the rapport, need to take a closer look at this, as it's all very subtle (and brittle, unfortunately). |
There's clearly need for a common interface or abstract class for all those iterating components like |
I think a either a Marker interface like cc @tandraschko |
i think it makes sense in general (but prefer a interface) but it would also make sense to improve the Mojarra algorithm, so that check isnt even needed like in myfaces |
I ran For the record, this is the (simplified) use case: view:
model:
reproducer:
|
let me check that case |
I feel like simply scanning the client ID for an iteration index pattern is sufficient for now. A numeric component ID is already disallowed by spec and iterable component implementations as far as I know already follow the same client ID pattern of "clientId:[0-9]+:childId". |
i can verify the issue but i feel it could be fixed without introducing the "isNestedInIterator" check but i need some time to debug |
I found this reproducer to be also failing when <h:dataTable> is used in Mojarra 2.3.17 and the issue 3833 IT to be failing as well for <h:dataTable> of MyFaces 2.3.9. I'll have to reapply the same fix in UIData for now. |
Refactor isNestedInIterator() to utility class so UIData can also use it
Apply same UIRepeat fix to UIData as well
Would be great indeed if that's possible. |
please see: it seems that in MF the state isnt always saved - only in some special cases i normal cases, the "value" is restored from the ValueBinding, which isnt available in this case |
Great. I'll look if I can retrofit MyFaces state saving approach into Mojarra's ui:repeat (and h:dataTable!). |
Conflicts: impl/src/main/java/com/sun/faces/facelets/component/UIRepeat.java impl/src/main/java/com/sun/faces/util/Util.java impl/src/main/java/javax/faces/component/UIData.java
Conflicts: impl/src/main/java/com/sun/faces/util/Util.java
It was less trivial than expected so I've postponed that for later. The initial PR is now at least merged into 2.3/3.0/4.0. |
Originally Reported at PrimeFaces: primefaces/primefaces#7777
PrimeFaces has a custom
p:repeat
component to fix an issue with Mojarraui:repeat
that is not present in MyFaces.Reproducer:
pf-7777.zip
The issue comes from this custom code in PF Repeat:
PrimeFaces:
Mojarra:
MyFaces doesn't do this at all and it works for the use case above. Any ideas or suggestions on how to improve UIRepeat for Mojarra so PF can remove its custom
p:repeat
???cc @BalusC @arjantijms
The text was updated successfully, but these errors were encountered: