com.sdm.quasar.client.jsf.application.dialog
Class SunRIStateManager

java.lang.Object
  extended byStateManagerImpl
      extended bycom.sdm.quasar.client.jsf.application.dialog.SunRIStateManager

public class SunRIStateManager
extends StateManagerImpl

This class takes care of creating, storing and restoring views (javax.faces.component.UIViewRoot) of dialog instances. It utilizes the dialogs' instance-id to store different view-states for equal view-files (jsp/faces). This is necessary because otherwise all dialog instances (Java objects) would use the same view being stored by the default JSF com.sdm.quasar.client.comp.dlgstate.StateManager as it doesn't know anything about dialog-instances. This class directly extends com.sun.faces.application.StateManagerImpl, which is the actual state-manager implementation which is provided by Sun. Copyright (c) 2005 software design & management AG All rights reserved. This file is made available under the terms of the license agreement that accompanies this distribution. $Revision:$, last modified $Date: $ by $Author: $

Author:
Carsten Lucke
See Also:
Serialized Form

Field Summary
protected  StateManager _base
          The standard ViewHandler
 
Constructor Summary
SunRIStateManager(StateManager orig)
          Constructor.
 
Method Summary
protected static java.lang.String getTaggedViewId()
          Returns the view-identifier.
 UIViewRoot restoreView(FacesContext context, java.lang.String viewId, java.lang.String renderKitId)
          Writes the state for the view.
 SerializedView saveSerializedView(FacesContext context)
          Serializes the date of the faces-context's current view.
 void writeState(FacesContext context, SerializedView state)
          Writes the state for the view.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_base

protected StateManager _base
The standard ViewHandler

Constructor Detail

SunRIStateManager

public SunRIStateManager(StateManager orig)
Constructor.

Parameters:
orig - the standard ViewHandler
Method Detail

writeState

public void writeState(FacesContext context,
                       SerializedView state)
                throws java.io.IOException
Writes the state for the view. Utilizes the dialoginstance-id to enable multiton behaviour for the view-state.

Parameters:
context -
state -
Throws:
java.io.IOException
See Also:
javax.faces.application.StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)

restoreView

public UIViewRoot restoreView(FacesContext context,
                              java.lang.String viewId,
                              java.lang.String renderKitId)
Writes the state for the view. Utilizes the dialoginstance-id to enable multiton behaviour for the view-state.

Parameters:
context -
viewId -
renderKitId -
See Also:
javax.faces.application.StateManager#restoreView(javax.faces.context.FacesContext, java.lang.String, java.lang.String)

saveSerializedView

public SerializedView saveSerializedView(FacesContext context)
                                  throws java.lang.IllegalStateException
Serializes the date of the faces-context's current view. Utilizes the dialoginstance-id to enable multiton behaviour for the view-state.

Parameters:
context -
Throws:
java.lang.IllegalStateException
See Also:
javax.faces.application.StateManager#saveSerializedView(javax.faces.context.FacesContext)

getTaggedViewId

protected static java.lang.String getTaggedViewId()
Returns the view-identifier. It's the string-representation of the current dialog's instance-id.

Returns:
the view-identifier