ResponseStateManager rsm = FacesContext.getCurrentInstance().getRenderKit().getResponseStateManager(); if (!rsm.isPostback(FacesContext.getCurrentInstance())) { //do some stuff }
FacesContext context = FacesContext.getCurrentInstance(); ResponseStateManager rsm = context.getRenderKit().getResponseStateManager(); if (!rsm.isPostback(context)) { // do whatever you need here }
@Override public boolean isPostback(FacesContext context) { return getWrapped().isPostback(context); }
@Override public boolean isPostback(FacesContext context) { return getWrapped().isPostback(context); }
@Override public boolean isPostback(FacesContext context) { return getWrapped().isPostback(context); }
protected boolean isPostBack() { FacesContext facesContext = FacesContext.getCurrentInstance(); return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); }
private boolean isPostback() { FacesContext facesContext = FacesContext.getCurrentInstance(); Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " + "You should use @Deferred so the binding gets executed within the JSF lifecycle."); return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); }
public boolean isPostback(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String renderkitId = viewHandler.calculateRenderKitId(facesContext); ResponseStateManager rsm = RendererUtils.getResponseStateManager(facesContext, renderkitId); return rsm.isPostback(facesContext); }
public boolean isPostback(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String renderkitId = viewHandler.calculateRenderKitId(facesContext); ResponseStateManager rsm = RendererUtils.getResponseStateManager(facesContext, renderkitId); return rsm.isPostback(facesContext); } }
public boolean isPostback(FacesContext facesContext) { return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); }
public boolean isPostback(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String renderkitId = viewHandler.calculateRenderKitId(facesContext); ResponseStateManager rsm = RendererUtils.getResponseStateManager(facesContext, renderkitId); return rsm.isPostback(facesContext); }
private boolean isPostback() { FacesContext facesContext = FacesContext.getCurrentInstance(); Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " + "You should use @Deferred so the binding gets executed within the JSF lifecycle."); return facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); }
/** * @param context the <code>FacesContext</code> for the current request * @return <code>true</code> if the {@link ResponseStateManager#isPostback(javax.faces.context.FacesContext)} * returns <code>true</code> <em>and</em> the request doesn't contain the * attribute <code>javax.servlet.error.message</code> which indicates we've been * forwarded to an error page. */ private boolean isPostback(FacesContext context) { // Get the renderKitId by calling viewHandler.calculateRenderKitId(). String renderkitId = context.getApplication().getViewHandler(). calculateRenderKitId(context); ResponseStateManager rsm = RenderKitUtils.getResponseStateManager(context, renderkitId); return rsm.isPostback(context); }
/** * Determine if the current request/FacesContext is in PostBack state */ public static boolean isPostback(final FacesContext context) { RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); RenderKit renderKit = factory.getRenderKit(context, RenderKitFactory.HTML_BASIC_RENDER_KIT); return renderKit.getResponseStateManager().isPostback(context); } }
/** * Determine if the current request/FacesContext is in PostBack state */ public static boolean isPostback(final FacesContext context) { RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); RenderKit renderKit = factory.getRenderKit(context, RenderKitFactory.HTML_BASIC_RENDER_KIT); return renderKit.getResponseStateManager().isPostback(context); } }
/** * Determine if the current request/FacesContext is in PostBack state */ public static boolean isPostback(final FacesContext context) { RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); RenderKit renderKit = factory.getRenderKit(context, RenderKitFactory.HTML_BASIC_RENDER_KIT); return renderKit.getResponseStateManager().isPostback(context); } }
/** * Determine if the current request/FacesContext is in PostBack state */ public static boolean isPostback(final FacesContext context) { RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY); RenderKit renderKit = factory.getRenderKit(context, RenderKitFactory.HTML_BASIC_RENDER_KIT); return renderKit.getResponseStateManager().isPostback(context); } }
public boolean isPostback(FacesContext facesContext) { ViewHandler viewHandler = facesContext.getApplication().getViewHandler(); String renderkitId = viewHandler.calculateRenderKitId(facesContext); ResponseStateManager rsm = getRenderKitFactory().getRenderKit(facesContext, renderkitId).getResponseStateManager(); return rsm.isPostback(facesContext); }
@Override public void perform(Rewrite event, EvaluationContext context) { FacesContext facesContext = FacesContext.getCurrentInstance(); Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " + "You should use @Deferred so the operation gets executed within the JSF lifecycle."); // getRenderKit() may return null in some situations boolean postback = false; if (facesContext.getRenderKit() != null) { postback = facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); } if (!postback) { delegate.perform(event, context); } }
@Override public void perform(Rewrite event, EvaluationContext context) { FacesContext facesContext = FacesContext.getCurrentInstance(); Assert.notNull(facesContext, "FacesContext.getCurrentInstance() returned null. " + "You should use @Deferred so the operation gets executed within the JSF lifecycle."); // getRenderKit() may return null in some situations boolean postback = false; if (facesContext.getRenderKit() != null) { postback = facesContext.getRenderKit().getResponseStateManager().isPostback(facesContext); } if (!postback) { delegate.perform(event, context); } }