I have the following event type preRenderView
to execute a method before loading the page:
<f:event listener="#{aprobacionFlujoController.preRender}" type="preRenderView" />
I need to send a parameter to that listener, what is the best way to do it? I tried in the following way:
<f:metadata>
<f:event listener="#{aprobacionFlujoController.preRender}" type="preRenderView" />
<f:attribute name="myid" value="true" />
</f:metadata>
And in the controller
public void retrieveData(ComponentSystemEvent event) {
String id = (String) event.getComponent().getAttributes().get("myid");}
But getAttributes()
comes empty.