Sep 14, 2018

JSF: f:metadata Example

JSF: f:metadata Example


<ui:define name="body">
<f:metadata>
           <f:viewParam name="id" value="#{bean.id}"/>
           <f:event type="preRenderView" listener="#{bean.load}"/>
</f:metadata>
                    ....
</ui:define>
You need to put includeViewParams=true to the link.


Your listener should be:
public void load(ComponentSystemEvent event) {
       // ...
}