## org.apache.portals.bridges.jsf
Class PortletUIViewRoot

    java.lang.Object
      javax.faces.component.UIComponent
          javax.faces.component.UIComponentBase
              javax.faces.component.UIViewRoot
                  org.apache.portals.bridges.jsf.PortletUIViewRoot

All Implemented Interfaces:
  javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class PortletUIViewRoot
extends javax.faces.component.UIViewRoot
implements javax.faces.component.NamingContainer

A portlet view root that implements a naming container to creates unique client ids.

Author:
  Matthew Bruzek

Field Summary
`private String` `_namespace`
`static String` `VIEW_PREFIX` A portlet view id constant to prepend to the namespace.

Fields inherited from class javax.faces.component.UIViewRoot
`COMPONENT_FAMILY, COMPONENT_TYPE, UNIQUE_ID_PREFIX`

Fields inherited from class javax.faces.component.UIComponentBase
``

Fields inherited from interface javax.faces.component.NamingContainer
`SEPARATOR_CHAR`

Constructor Summary
`PortletUIViewRoot()` The default constructor calls the UIViewRoot default constructor.
`PortletUIViewRoot(javax.faces.component.UIViewRoot viewRoot)` The convenience constructor creates a PortletUIViewRoot from a UIViewRoot.

Method Summary
`String` `getClientId(javax.faces.context.FacesContext context)` Return a string which can be used as output to the response which uniquely identifies a component within the current view.
`void` `restoreState(javax.faces.context.FacesContext context, Object state)`
`Object` `saveState(javax.faces.context.FacesContext context)`

Methods inherited from class javax.faces.component.UIViewRoot
`createUniqueId, encodeBegin, getFamily, getLocale, getRenderKitId, getViewId, processApplication, processDecodes, processUpdates, processValidators, queueEvent, setLocale, setRenderKitId, setViewId`

Methods inherited from class javax.faces.component.UIComponentBase

`addFacesListener, broadcast, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### VIEW_PREFIX

    public static final String VIEW_PREFIX

  A portlet view id constant to prepend to the namespace.

  See Also:
    Constant Field Values

### _namespace

    private String _namespace

Constructor Detail

### PortletUIViewRoot

    public PortletUIViewRoot()

  The default constructor calls the UIViewRoot default constructor.

### PortletUIViewRoot

    public PortletUIViewRoot(javax.faces.component.UIViewRoot viewRoot)

  The convenience constructor creates a PortletUIViewRoot from a UIViewRoot.

Parameters:
  `viewRoot` - The UIViewRoot to use when creating this object.

Method Detail

### getClientId

    public String getClientId(javax.faces.context.FacesContext context)

  Return a string which can be used as output to the response which uniquely identifies a component within the current view.

  Parameters:
    `context` - The FacesContext object for the current request.

### saveState

    public Object saveState(javax.faces.context.FacesContext context)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             Object state)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.