You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agreed. There are indeed real world use cases where this is really useful. The technical problem is that FaceletContext is essentially volatile and is tied to the current Facelet being being processed. The implementation in Mojarra is actually not entirely correct (ui:param is leaking outside Facelet). Ultimately we would need a helper something like FaceletContext.getIncludeParam(faceletPath, paramName).
There is another difficulty. A single include file can be included multiple times in same view. How do we know which one we want to obtain the param from? By index will do it but is pretty brittle when dev decides to rearrange layout and forgets to adjust index to obtain param.
We could give <ui:include>/<ui:decorate> something like an id attribute but it should not be confused with those of UIComponent.
volosied
changed the title
Stanardize how to retrieve ui:param from Backing Bean / FaceletContext
Standardize how to retrieve ui:param from Backing Bean / FaceletContext
Oct 3, 2024
Mojarra supports the following:
However, the code above does not always work in MyFaces. One workaround is to use c:set instead, but it would nice to have something spec defined.
Additional Information:
Passing bean properties and action methods via <ui:param>
sectionThe text was updated successfully, but these errors were encountered: