Nov 7, 2017

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) {
       // ...
}

Post a Comment

Featured Post

Setup Chinese Input Method in Ubuntu 17.10 Artful

sudo apt install ibus-sunpinyin After either of those commands do not forget to restart the IBus daemon ibus restart You might need t...