com.jk.web.faces.renderers.JKPreRenderer Maven / Gradle / Ivy
package com.jk.web.faces.renderers;
import java.io.IOException;
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.PreRenderComponentEvent;
import javax.faces.event.SystemEvent;
import javax.faces.event.SystemEventListener;
import org.omnifaces.component.output.Cache;
import org.primefaces.component.cache.UICache;
public class JKPreRenderer implements SystemEventListener {
@Override
public void processEvent(SystemEvent event) throws AbortProcessingException {
// if (event instanceof PreRenderComponentEvent) {
// if(FacesContext.getCurrentInstance().isPostback()){
// PreRenderComponentEvent preRenderComponentEvent = (PreRenderComponentEvent) event;
//
// UIComponent component = preRenderComponentEvent.getComponent();
// }
// }
}
@Override
public boolean isListenerForSource(Object source) {
// if(source instanceof UICache ) {
// UICache cache=(UICache) source;
// //cache.clearInitialState();
// return true;
// }
// return false;
return true;
}
}