congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
StateManager$SerializedView
Code IndexAdd Tabnine to your IDE (free)

How to use
StateManager$SerializedView
in
javax.faces.application

Best Java code snippets using javax.faces.application.StateManager$SerializedView (Showing top 20 results out of 315)

Refine searchRefine arrow

  • StateManager
  • FacesContext
origin: org.apache.myfaces/com.springsource.org.apache.myfaces

public void writeState(FacesContext facescontext,
            StateManager.SerializedView serializedview) throws IOException {
  ResponseWriter responseWriter = facescontext.getResponseWriter();
  if (facescontext.getApplication().getStateManager().isSavingStateInClient(facescontext)) {
    if (log.isTraceEnabled()) log.trace("Writing state in client");
    Object treeStruct = serializedview.getStructure();
    Object compStates = serializedview.getState();
    if (log.isTraceEnabled()) log.trace("Writing state in server");
    Object treeStruct = serializedview.getStructure();
    if (treeStruct != null) {
      if (treeStruct instanceof String) {
  savedState[VIEWID_PARAM] = facescontext.getViewRoot().getViewId();
origin: org.apache.myfaces.core.internal/myfaces-shaded-impl

checkForDuplicateIds(facesContext, facesContext.getViewRoot(), new HashSet<String>());
ExternalContext externalContext = facesContext.getExternalContext();
  return new SerializedView(serializedViewArray[0], new Object[0]);
return new SerializedView(serializedViewArray[0], serializedViewArray[1]);
origin: org.apache.myfaces.core/myfaces-shaded-impl

  treeStruct = view.getStructure();
  compStates = view.getState();
if (facesContext.getApplication().getStateManager().isSavingStateInClient(facesContext))
savedState[VIEWID_PARAM] = facesContext.getViewRoot().getViewId();
return StateUtils.construct(savedState, facesContext.getExternalContext());
origin: org.jboss.spec.javax.faces/jboss-jsf-api_2.0_spec

if (2 == stateArray.length) {
StateManager stateManager = 
context.getApplication().getStateManager();
view = stateManager.new SerializedView(stateArray[0], 
    stateArray[1]);
} else {
origin: org.apache.myfaces.test/myfaces-test22

  treeStruct = view.getStructure();
  compStates = view.getState();
if (facesContext.getApplication().getStateManager()
    .isSavingStateInClient(facesContext))
savedState[VIEWID_PARAM] = facesContext.getViewRoot().getViewId();
origin: org.apache.myfaces.tobago/tobago-deprecation

public void writeState(final FacesContext facesContext,
  final StateManager.SerializedView serializedview) throws IOException {
 final ResponseWriter responseWriter = facesContext.getResponseWriter();
 final Object treeStruct = serializedview.getStructure();
 final Object compStates = serializedview.getState();
 responseWriter.writeAttribute(HtmlAttributes.NAME, VIEWID_PARAM, null);
 responseWriter.writeAttribute(HtmlAttributes.ID, VIEWID_PARAM, null);
 responseWriter.writeAttribute(HtmlAttributes.VALUE, facesContext.getViewRoot().getViewId(), null);
 responseWriter.endElement(HtmlElements.INPUT);
origin: org.seasar.teeda/teeda-core

protected UIViewRoot restoreTreeStructureFromServer(FacesContext context,
    String viewId) {
  SerializedView serializedView = getSerializedViewFromServer(context
      .getExternalContext(), viewId);
  if (serializedView == null) {
    return null;
  }
  TreeStructure struct = (TreeStructure) serializedView.getStructure();
  return (UIViewRoot) getTreeStructureManager().restoreTreeStructure(
      struct);
}
origin: org.apache.myfaces/com.springsource.org.apache.myfaces

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");
}
origin: org.springframework.webflow/org.springframework.faces

/**
 * JSF 1.1 version of state saving
 */
public javax.faces.application.StateManager.SerializedView saveSerializedView(FacesContext context) {
  if (context.getViewRoot().isTransient()) {
    return null;
  }
  if (!JsfUtils.isFlowRequest()) {
    return delegate.saveSerializedView(context);
  }
  SerializedView view = (SerializedView) saveView(context);
  return new javax.faces.application.StateManager.SerializedView(view.treeStructure, view.componentState);
}
origin: com.sun.faces/jsf-api

Object stateArray[] = null;
if (!context.getAttributes().containsKey(IS_CALLED_FROM_API_CLASS)) {
  SerializedView view = saveSerializedView(context);
  if (null != view) {
    stateArray = new Object[]{view.getStructure(),
          view.getState()};
origin: com.sun.faces/jsf-api

context.getAttributes().put(IS_CALLED_FROM_API_CLASS, Boolean.TRUE);
Object stateObj = null;
try {
  stateObj = saveView(context);
} finally {
  context.getAttributes().remove(IS_CALLED_FROM_API_CLASS);
    Object [] state = (Object[]) stateObj;
    if (state.length == 2) {
      result = new SerializedView(state[0], state[1]);
origin: javax.faces/jsf-impl

ResponseWriter writer = context.getResponseWriter();
if (stateManager.isSavingStateInClient(context)) {
  ObjectOutputStream oos = null;
  ByteArrayOutputStream baos  = null;
    oos.writeObject(view.getStructure());
    oos.writeObject(view.getState());
    oos.flush();
    oos.close();
  writer.write(view.getStructure().toString());
origin: com.sun.faces/jsf-api

Object stateArray[] = (Object[]) state;
if (2 == stateArray.length) {
  SerializedView view = new SerializedView(stateArray[0],
                       stateArray[1]);
  writeState(context, view);
origin: org.apache.myfaces.core/myfaces-api

/**
 * Returns an object that is sufficient to recreate the component tree that is the viewroot of the specified
 * context.
 * <p>
 * The return value is suitable for passing to method writeState.
 * 
 * @since 1.2
 */
@Deprecated
public Object saveView(FacesContext context)
{
  StateManager.SerializedView serializedView = saveSerializedView(context);
  if (serializedView == null)
  {
    return null;
  }
  Object[] structureAndState = new Object[2];
  structureAndState[0] = serializedView.getStructure();
  structureAndState[1] = serializedView.getState();
  return structureAndState;
}
origin: org.apache.myfaces.core/myfaces-api

/**
 * Invokes getTreeStructureToSave and getComponentStateToSave, then return an object that wraps the two resulting
 * objects. This object can then be passed to method writeState.
 * <p>
 * Deprecated; use saveView instead.
 * 
 * @deprecated
 */
public StateManager.SerializedView saveSerializedView(FacesContext context)
{
  Object savedView = saveView(context);
  if (savedView != null && savedView instanceof Object[])
  {
    Object[] structureAndState = (Object[]) savedView;
    if (structureAndState.length == 2)
    {
      return new StateManager.SerializedView(structureAndState[0], structureAndState[1]);
    }
  }
  
  return null;
}
origin: org.seasar.teeda/teeda-core

protected UIViewRoot restoreTreeStructureFromServer(
    final FacesContext context, final String viewId) {
  final SerializedView serializedView = getSerializedViewFromServer(viewId);
  if (serializedView == null) {
    return null;
  }
  final TreeStructure struct = (TreeStructure) serializedView
      .getStructure();
  return (UIViewRoot) getTreeStructureManager().restoreTreeStructure(
      struct);
}
origin: org.seasar.teeda/teeda-core

protected SerializedView createSerializedView(FacesContext context) {
  Object struct = getTreeStructureToSave(context);
  Object state = getComponentStateToSave(context);
  return new SerializedView(struct, state);
}
origin: org.seasar.teeda/teeda-core

protected SerializedView createSerializedView(FacesContext context,
    UIViewRoot viewRoot) {
  Object struct = getTreeStructureToSave(context, viewRoot);
  Object state = getComponentStateToSave(context, viewRoot);
  return new SerializedView(struct, state);
}
origin: org.seasar.teeda/teeda-core

protected void restoreComponentStateFromServer(final FacesContext context,
    final UIViewRoot viewRoot) {
  final SerializedView serializedView = getSerializedViewFromServer(viewRoot
      .getViewId());
  if (serializedView == null) {
    return;
  }
  final Object state = serializedView.getState();
  if (state == null) {
    return;
  }
  viewRoot.processRestoreState(context, state);
}
origin: org.seasar.teeda/teeda-core

public StructureAndState(SerializedView serializedView) {
  this(serializedView.getStructure(), serializedView.getState());
}
javax.faces.applicationStateManager$SerializedView

Javadoc

Convenience struct for encapsulating tree structure and component state. This is necessary to allow the API to be flexible enough to work in JSP and non-JSP environments.

Most used methods

  • getState
  • getStructure
  • <init>

Popular in Java

  • Start an intent from android
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now