@Override public void writeState(FacesContext context, Object state) throws IOException { getWrapped().writeState(context, state); }
@Override @Deprecated public void writeState(FacesContext context, SerializedView state) throws IOException { getWrapped().writeState(context, state); }
@Override public void writeState(FacesContext facesContext, Object state) throws IOException { if (log.isLoggable(Level.FINEST)) { log.finest("Entering writeState"); } //UIViewRoot uiViewRoot = facesContext.getViewRoot(); //save state in response (client) RenderKit renderKit = facesContext.getRenderKit(); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); responseStateManager.writeState(facesContext, state); if (log.isLoggable(Level.FINEST)) { log.finest("Exiting writeState"); } }
@Override public void writeState(FacesContext facesContext, Object state) throws IOException { if (log.isLoggable(Level.FINEST)) log.finest("Entering writeState"); UIViewRoot uiViewRoot = facesContext.getViewRoot(); //save state in response (client) RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId()); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); responseStateManager.writeState(facesContext, state); if (log.isLoggable(Level.FINEST)) log.finest("Exiting writeState"); }
/** * Write out the state. * * @param context the Faces context. * @param state the state. * @throws IOException when an I/O error occurs. */ @Override public void writeState(FacesContext context, Object state) throws IOException { RenderKit rk = context.getRenderKit(); ResponseStateManager rsm = rk.getResponseStateManager(); rsm.writeState(context, state); }
/** * Write out the state. * * @param context the Faces context. * @param state the state. * @throws IOException when an I/O error occurs. */ @Override public void writeState(FacesContext context, Object state) throws IOException { RenderKit rk = context.getRenderKit(); ResponseStateManager rsm = rk.getResponseStateManager(); rsm.writeState(context, state); }
/** * Write out the state. * * @param context the Faces context. * @param state the state. * @throws IOException when an I/O error occurs. */ @Override public void writeState(FacesContext context, Object state) throws IOException { RenderKit rk = context.getRenderKit(); ResponseStateManager rsm = rk.getResponseStateManager(); rsm.writeState(context, state); }
/** * Write out the state. * * @param context the Faces context. * @param state the state. * @throws IOException when an I/O error occurs. */ @Override public void writeState(FacesContext context, Object state) throws IOException { RenderKit rk = context.getRenderKit(); ResponseStateManager rsm = rk.getResponseStateManager(); rsm.writeState(context, state); }
public synchronized void writeState(final FacesContext context, final SerializedView serializedView) throws IOException { if (isSavingStateInClient(context)) { final UIViewRoot viewRoot = context.getViewRoot(); final ResponseStateManager responseStateManager = getResponseStateManager( context, viewRoot.getRenderKitId()); responseStateManager.writeState(context, serializedView); } }
writeState(context, view);
public void writeState(FacesContext context, Object state) throws IOException{ SerializedView view; if (state instanceof SerializedView) { view = (SerializedView) state; } else if (state instanceof Object[]) { Object[] structureAndState = (Object[]) state; if (structureAndState.length == 2) { Object structureObj = structureAndState[0]; Object stateObj = structureAndState[1]; StateManager stateManager = context.getApplication().getStateManager(); view = stateManager.new SerializedView(structureObj, stateObj); } else { throw new IOException("The state should be an array of Object[] of lenght 2"); } } else { throw new IOException("The state should be an array of Object[] of lenght 2, or a SerializedView instance"); } writeState(context, view); }
public void writeState(FacesContext context, Object state) throws IOException { SerializedView view; if (state instanceof SerializedView) { view = (SerializedView)state; } else if (state instanceof Object[]) { Object[] structureAndState = (Object[])state; if (structureAndState.length == 2) { Object structureObj = structureAndState[0]; Object stateObj = structureAndState[1]; StateManager stateManager = context.getApplication().getStateManager(); view = stateManager.new SerializedView(structureObj, stateObj); } else { throw new IOException("The state should be an array of Object[] of lenght 2"); } } else { throw new IOException("The state should be an array of Object[] of lenght 2, or a SerializedView instance"); } writeState(context, view); }
public void writeState(FacesContext context, SerializedView serializedView) throws IOException { if (isSavingStateInClient(context)) { UIViewRoot viewRoot = context.getViewRoot(); ResponseStateManager responseStateManager = ResponseStateManagerUtil .getResponseStateManager(context, viewRoot.getRenderKitId()); responseStateManager.writeState(context, serializedView); } }
@SuppressWarnings("deprecation") @Override public void writeState(FacesContext context, SerializedView state) throws IOException { String renderKitId = context.getViewRoot().getRenderKitId(); ResponseStateManager rsm = RenderKitUtils.getResponseStateManager(context, renderKitId); if (hasGetStateMethod(rsm)) { Object[] stateArray = new Object[2]; stateArray[0] = state.getStructure(); stateArray[1] = state.getState(); rsm.writeState(context, stateArray); } else { rsm.writeState(context, state); } }
@Override public void writeState(FacesContext facesContext, SerializedView serializedView) throws IOException { if (log.isLoggable(Level.FINEST)) log.finest("Entering writeState"); UIViewRoot uiViewRoot = facesContext.getViewRoot(); //save state in response (client) RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId()); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); if (isLegacyResponseStateManager(responseStateManager)) { responseStateManager.writeState(facesContext, serializedView); } else if (!isSavingStateInClient(facesContext)) { Object[] state = new Object[2]; state[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX); responseStateManager.writeState(facesContext, state); } else { Object[] state = new Object[2]; state[0] = serializedView.getStructure(); state[1] = serializedView.getState(); responseStateManager.writeState(facesContext, state); } if (log.isLoggable(Level.FINEST)) log.finest("Exiting writeState"); }
public void writeState(FacesContext facesContext, SerializedView serializedView) throws IOException { if (log.isTraceEnabled()) log.trace("Entering writeState"); UIViewRoot uiViewRoot = facesContext.getViewRoot(); //save state in response (client) RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId()); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); if (isLegacyResponseStateManager(responseStateManager)) { responseStateManager.writeState(facesContext, serializedView); } else if (!isSavingStateInClient(facesContext)) { Object[] state = new Object[2]; state[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX); responseStateManager.writeState(facesContext, state); } else { Object[] state = new Object[2]; state[0] = serializedView.getStructure(); state[1] = serializedView.getState(); responseStateManager.writeState(facesContext, state); } if (log.isTraceEnabled()) log.trace("Exiting writeState"); }
@Override public void writeState(FacesContext facesContext, SerializedView serializedView) throws IOException { if (log.isLoggable(Level.FINEST)) log.finest("Entering writeState"); UIViewRoot uiViewRoot = facesContext.getViewRoot(); //save state in response (client) RenderKit renderKit = getRenderKitFactory().getRenderKit(facesContext, uiViewRoot.getRenderKitId()); ResponseStateManager responseStateManager = renderKit.getResponseStateManager(); if (isLegacyResponseStateManager(responseStateManager)) { responseStateManager.writeState(facesContext, serializedView); } else if (!isSavingStateInClient(facesContext)) { Object[] state = new Object[2]; state[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX); responseStateManager.writeState(facesContext, state); } else { Object[] state = new Object[2]; state[0] = serializedView.getStructure(); state[1] = serializedView.getState(); responseStateManager.writeState(facesContext, state); } if (log.isLoggable(Level.FINEST)) log.finest("Exiting writeState"); }
@Override public void writeState(FacesContext facesContext, Object state) throws IOException { if (!JsfUtils.isFlowRequest()) { super.writeState(facesContext, state); } else { saveState(state); ResponseWriter writer = facesContext.getResponseWriter(); writeViewStateField(facesContext, writer); writeRenderKitIdField(facesContext, writer); } }
@Override public void writeState(FacesContext facesContext, Object state) throws IOException { if (!JsfUtils.isFlowRequest()) { super.writeState(facesContext, state); } else { saveState(state); ResponseWriter writer = facesContext.getResponseWriter(); writeViewStateField(facesContext, writer); writeRenderKitIdField(facesContext, writer); } }