-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Original PrimeFaces Discussion and Analysis: https://github.com/orgs/primefaces/discussions/2350
Brief Overview
PF13- used to have its own @id resolver that always walked the component tree and was working. In PF14 that was removed to rely on JSF 2.3+ ID resolver which behaves differently. We are doing render="@root:@id(growl)" inside a Datatable row.
Code
The question is I don't see how it can ever get to the branch where it walks the component instead of using visitTree
mojarra/impl/src/main/java/com/sun/faces/component/search/SearchKeywordResolverImplId.java
Lines 42 to 47 in 2a0e8fc
| if (isHintSet(searchKeywordContext.getSearchExpressionContext(), SearchExpressionHint.SKIP_VIRTUAL_COMPONENTS)) { | |
| // Avoid visit tree because in this case we need real component instances. | |
| // This means components inside UIData will not be scanned. | |
| findWithId(facesContext, id, current, searchKeywordContext.getCallback()); | |
| } else { | |
| current.visitTree(VisitContext.createVisitContext(facesContext, null, searchKeywordContext.getSearchExpressionContext().getVisitHints()), |
I have grepped the code base and I never see SearchExpressionHint.SKIP_VIRTUAL_COMPONENTS actually ever set and the note even mentions..
// Avoid visit tree because in this case we need real component instances.
// This means components inside UIData will not be scanned.
Question
So how does the branch that doesn't use visitTree ever get executed? Right now I had to inject the old PF @id resolver to fix this issue and have the code work like it did before using the PF findWithId type code.