Nov 8, 2018

ComponentSystemEvent in JSF 2

ComponentSystemEvent is very useful.

For example, preRenderComponent is one of ComponentSystemEvent

<h:commandButton value="Generate Reports"
          action="#{customValuesSrv.generateWithSelectedLists}">
<f:event type="preRenderComponent"
          listener="#{customValuesSrv.beforeRenderGenerateReportsButton}" />
</h:commandButton>

public void beforeRenderGenerateReportsButton(ComponentSystemEvent event) {
       customeValues=customFacade.findCustomValue(getSelectedLists());
   }


Direct Known Subclasses:

PostAddToViewEvent, PostConstructViewMapEvent, PostRestoreStateEvent, PostValidateEvent, PreDestroyViewMapEvent, PreRemoveFromViewEvent, PreRenderComponentEvent, PreRenderViewEvent, PreValidateEvent

See also:

JSF: f:metadata Example