/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the * wrapped {@link StateManager} object.</p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
@Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the * wrapped {@link StateManager} object.</p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the * wrapped {@link StateManager} object.</p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the * wrapped {@link StateManager} object.</p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0">The default behavior of this method * is to call {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the * wrapped {@link StateManager} object.</p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call * {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the wrapped * {@link StateManager} object. * </p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call * {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the wrapped * {@link StateManager} object. * </p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call * {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the wrapped * {@link StateManager} object. * </p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
/** * <p class="changed_added_2_0"> * The default behavior of this method is to call * {@link StateManager#getViewState(javax.faces.context.FacesContext)} on the wrapped * {@link StateManager} object. * </p> * * @since 2.0 */ @Override public String getViewState(FacesContext context) { return getWrapped().getViewState(context); } }
public void write(String str) throws IOException { if (EnvUtils.getStateMarker().equals(str)) { out.write("<input id=\"javax.faces.ViewState\" type=\"hidden\" autocomplete=\"off\" value=\""); out.write(facesContext.getApplication().getStateManager().getViewState(facesContext)); out.write("\" name=\"javax.faces.ViewState\"/>"); } else { out.write(str); } } }
public void write(String str) throws IOException { if (EnvUtils.getStateMarker().equals(str) ) { FacesContext fc = FacesContext.getCurrentInstance(); out.write("<input id=\"" + EnvUtils.getParameterNamespace(fc) + "javax.faces.ViewState\" type=\"hidden\" autocomplete=\"off\" value=\""); out.write(fc.getApplication().getStateManager().getViewState(fc)); out.write("\" name=\"" + EnvUtils.getParameterNamespace(fc) + "javax.faces.ViewState\"/>"); } else { out.write(str); } } }
protected void writeViewStateHiddenField() throws IOException { startElement("input", null); writeAttribute("type", "hidden", null); String viewStateName = PartialResponseWriter.VIEW_STATE_MARKER; if (namespacedParameters) { FacesContext facesContext = FacesContext.getCurrentInstance(); String namingContainerId = facesContext.getViewRoot().getContainerClientId(facesContext); viewStateName = namingContainerId + viewStateName; } writeAttribute("name", viewStateName, null); // TODO: The following line is a workaround and needs to be fixed in FACES-1797. writeAttribute("id", viewStateName, null); FacesContext facesContext = FacesContext.getCurrentInstance(); String viewState = facesContext.getApplication().getStateManager().getViewState(facesContext); writeAttribute("value", viewState, null); writeAttribute(ATTRIBUTE_AUTOCOMPLETE, VALUE_OFF, null); endElement("input"); } }
protected void writeViewStateHiddenField() throws IOException { startElement("input", null); writeAttribute("type", "hidden", null); String viewStateName = PartialResponseWriter.VIEW_STATE_MARKER; if (namespacedParameters) { FacesContext facesContext = FacesContext.getCurrentInstance(); String namingContainerId = facesContext.getViewRoot().getContainerClientId(facesContext); viewStateName = namingContainerId + viewStateName; } writeAttribute("name", viewStateName, null); // TODO: The following line is a workaround and needs to be fixed in FACES-1797. writeAttribute("id", viewStateName, null); FacesContext facesContext = FacesContext.getCurrentInstance(); String viewState = facesContext.getApplication().getStateManager().getViewState(facesContext); writeAttribute("value", viewState, null); writeAttribute(ATTRIBUTE_AUTOCOMPLETE, VALUE_OFF, null); endElement("input"); } }
private String renderState() throws IOException { Map facesMap = facesContext.getAttributes(); PartialResponseWriter writer = getPartialResponseWriter(); String viewState = facesContext.getApplication().getStateManager().getViewState(facesContext); if (EnvUtils.isJSF22OrGreater()) { ArrayList formIdList = (ArrayList) facesMap.get(FixViewState.FORM_LIST_KEY); if (formIdList != null && !formIdList.isEmpty()) { UIViewRoot viewRoot = facesContext.getViewRoot(); String containerClientId = viewRoot.getContainerClientId(facesContext); char separator = UINamingContainer.getSeparatorChar(facesContext); for (int i = 0; i < formIdList.size(); i++) { writer.startUpdate(containerClientId + separator + PartialResponseWriter.VIEW_STATE_MARKER + separator + i); writer.write(viewState); writer.endUpdate(); } } } else { writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER); writer.write(viewState); writer.endUpdate(); } return viewState; }
private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = Util.getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = Util.getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }
private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = Util.getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = Util.getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }
private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = Util.getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = Util.getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }
private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = Util.getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = Util.getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }
/** * Copied from com.sun.faces.context.PartialViewContextImpl. May have to be * adapted to future Mojarra or JSF versions. */ private void renderState(FacesContext context) throws IOException { // Get the view state and write it to the response.. PartialViewContext pvc = context.getPartialViewContext(); PartialResponseWriter writer = pvc.getPartialResponseWriter(); String viewStateId = getViewStateId(context); writer.startUpdate(viewStateId); String state = context.getApplication().getStateManager().getViewState(context); writer.write(state); writer.endUpdate(); ClientWindow window = context.getExternalContext().getClientWindow(); if (null != window) { String clientWindowId = getClientWindowId(context); writer.startUpdate(clientWindowId); writer.write(window.getId()); writer.endUpdate(); } }