I would like to execute processDecodes
of JSF UI components subtree on ajax request.
I'll detail a little better, if I specify:
<f:ajax event="change" execute="componentId" render="componentPanelId" />
I would like that processDecodes
is invoked on every component starting from the UIViewRoot to the component with id componentId, and on all componentId ancestors.
I would do so because, ui custom component parent of the target component do some evaluation,
specifically they narrow the portion of XML document, on which ui component value apply.
Suppose to have the following facelet fragment:
<m:node id="root" ref="/Root">
<m:node id="element" ref="Element">
<m:label>Some Label</m:label>
<m:selectOne id="componentId" ref="@Attribute1" execute="@this" render="toRender">
...
</m:selectOne>
<m:selectOne id="toRender" ref="@Attribute2">
...
</m:selectOne>
</m:node>
</m:node>
Provided that I have already implemented ajax behaviour in custom component, with attributes execute
and render
.
When componentId ajax event trigger, I would process the components with id: 'root', 'element' and 'componentId', in the specified order.
I tried to do use @form
as execute attribute value:
<m:selectOne id="componentId" ref="@Attribute1" execute="@form" render="toRender">
...
</m:selectOne>
It works, because JSF processes all ui components in the form, but this is not the desired behaviour.
Maybe by extending PartialViewContextFactory
?
Any Hint or Help will be appreciated Thank you