Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created December 12, 2011 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfryc/1468531 to your computer and use it in GitHub Desktop.
Save lfryc/1468531 to your computer and use it in GitHub Desktop.
public void processEvent(SystemEvent event) throws AbortProcessingException {
if (event instanceof PostRestoreStateEvent) {
FacesContext.getCurrentInstance().getApplication().subscribeToEvent(PreRenderViewEvent.class, this);
preDecode(getFacesContext());
}
if (event instanceof PreRenderViewEvent) {
FacesContext.getCurrentInstance().getApplication().unsubscribeFromEvent(PreRenderViewEvent.class, this);
preEncodeBegin(getFacesContext());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment