Save This Page
Home » trinidad-1.2.8-src-all » org.apache.myfaces.trinidad » component » [javadoc | source]
org.apache.myfaces.trinidad.component
abstract public class: UIXComponentBase [javadoc | source]
java.lang.Object
   javax.faces.component.UIComponent
      org.apache.myfaces.trinidad.component.UIXComponent
         org.apache.myfaces.trinidad.component.UIXComponentBase

Direct Known Subclasses:
    UIXProgressTemplate, UIXMenuTemplate, UIXSwitcherTemplate, UIXHierarchy, UIXNavigationLevelTemplate, UIXFormTemplate, UIXNavigationPathTemplate, UIXSelectRangeTemplate, UIXComponentRefTemplate, UIXNavigationTreeTemplate, UIXObjectTemplate, UIXGroupTemplate, UIXValueTemplate, UIXSingleStepTemplate, UIXPollTemplate, UIXProcessTemplate, UIXChartTemplate, UIXSubformTemplate, UIXCommandTemplate, UIXColumnTemplate, UIXShowOneTemplate, UIXGoTemplate, UIXShowDetailTemplate, UIXNavigationHierarchy, UIXPageTemplate, UIXCollection, UIXPanelTemplate, UIXTreeTemplate, UIXTableTemplate, UIXDecorateCollectionTemplate, UIXIteratorTemplate, UIXMenuHierarchy

Base implementation of components for all of Trinidad. UIXComponentBase offers a number of features not supplied by the standard UIComponentBase class:

FacesBean and UIXComponentBase

UIXComponentBase differs from UIXComponent most particularly in its use of FacesBeans to store all state. This offers a number of advantages:

Field Summary
public static final  FacesBean.Type TYPE     
public static final  PropertyKey ID_KEY     
public static final  PropertyKey RENDERED_KEY     
public static final  PropertyKey BINDING_KEY     
public static final  PropertyKey TRANSIENT_KEY     
public static final  PropertyKey RENDERER_TYPE_KEY     
Constructor:
 public UIXComponentBase() 
 public UIXComponentBase(String rendererType) 
Method from org.apache.myfaces.trinidad.component.UIXComponentBase Summary:
__encodeRecursive,   __getSharedStringBuilder,   __rendererDecode,   adaptMethodBinding,   addAttributeChange,   addAttributeChangeListener,   addFacesListener,   broadcast,   broadcastToMethodBinding,   broadcastToMethodExpression,   createFacesBean,   decode,   decodeChildren,   decodeChildrenImpl,   encodeAll,   encodeBegin,   encodeChildren,   encodeEnd,   findComponent,   getAttributeChangeListener,   getAttributeChangeListeners,   getAttributes,   getBeanType,   getBooleanProperty,   getChildCount,   getChildren,   getClientId,   getContainerClientId,   getFacesBean,   getFacesContext,   getFacesListeners,   getFacet,   getFacetCount,   getFacetNames,   getFacets,   getFacetsAndChildren,   getFamily,   getId,   getIntProperty,   getLifecycleRenderer,   getParent,   getProperty,   getPropertyKey,   getRenderer,   getRendererType,   getRendersChildren,   getValueBinding,   getValueExpression,   isRendered,   isTransient,   markInitialState,   processDecodes,   processRestoreState,   processSaveState,   processUpdates,   processValidators,   queueEvent,   removeAttributeChangeListener,   removeFacesListener,   restoreState,   saveState,   setAttributeChangeListener,   setAttributeChangeListener,   setBooleanProperty,   setId,   setIntProperty,   setParent,   setProperty,   setRendered,   setRendererType,   setTransient,   setValueBinding,   setValueExpression,   toString,   updateChildren,   updateChildrenImpl,   validateChildren,   validateChildrenImpl
Methods from org.apache.myfaces.trinidad.component.UIXComponent:
addAttributeChangeListener,   getAttributeChangeListener,   getAttributeChangeListeners,   getContainerClientId,   getFacesBean,   markInitialState,   processFlattenedChildren,   processFlattenedChildren,   processFlattenedChildren,   processFlattenedChildren,   removeAttributeChangeListener,   setAttributeChangeListener
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.myfaces.trinidad.component.UIXComponentBase Detail:
  void __encodeRecursive(FacesContext context,
    UIComponent component) throws IOException 
    render a component. this is called by renderers whose getRendersChildren() return true.
 static StringBuilder __getSharedStringBuilder() 

    This gets a single threadlocal shared stringbuilder instance, each time you call __getSharedStringBuilder it sets the length of the stringBuilder instance to 0.

    This allows you to use the same StringBuilder instance over and over. You must call toString on the instance before calling __getSharedStringBuilder again.

    Example that works
    
    StringBuilder sb1 = __getSharedStringBuilder();
    sb1.append(a).append(b);
    String c = sb1.toString();
    
    StringBuilder sb2 = __getSharedStringBuilder();
    sb2.append(b).append(a);
    String d = sb2.toString();
    


    Example that doesn't work, you must call toString on sb1 before calling __getSharedStringBuilder again.
    
    StringBuilder sb1 = __getSharedStringBuilder();
    StringBuilder sb2 = __getSharedStringBuilder();
    
    sb1.append(a).append(b);
    String c = sb1.toString();
    
    sb2.append(b).append(a);
    String d = sb2.toString();
    
  void __rendererDecode(FacesContext context) 
 public static MethodExpression adaptMethodBinding(MethodBinding binding) 
    Given a MethodBinding, create a MethodExpression that adapts it.
 protected  void addAttributeChange(String attributeName,
    Object attributeValue) 
 public  void addAttributeChangeListener(AttributeChangeListener acl) 
 protected  void addFacesListener(FacesListener listener) 
 public  void broadcast(FacesEvent event) throws AbortProcessingException 
 protected final  void broadcastToMethodBinding(FacesEvent event,
    MethodBinding method) throws AbortProcessingException 
Deprecated!
    Broadcast an event to a MethodBinding. This can be used to support MethodBindings such as the "actionListener" binding on ActionSource components: <tr:commandButton actionListener="#{mybean.myActionListener}">
 protected final  void broadcastToMethodExpression(FacesEvent event,
    MethodExpression method) throws AbortProcessingException 
    Broadcast an event to a MethodExpression. This can be used to support MethodBindings such as the "actionListener" binding on ActionSource components: <tr:commandButton actionListener="#{mybean.myActionListener}">
 protected FacesBean createFacesBean(String rendererType) 
 public  void decode(FacesContext context) 
 protected final  void decodeChildren(FacesContext context) 
    Delegates to LifecycleRenderer, if present, otherwise calls decodeChildrenImpl.
 protected  void decodeChildrenImpl(FacesContext context) 
    Calls processDecodes on all facets and children of this component.
 public  void encodeAll(FacesContext context) throws IOException 
    Encodes a component and all of its children, whether getRendersChildren() is true or false. When rendersChildren is false, each child whose "rendered" property is true will be sequentially rendered; facets will be ignored.
 public  void encodeBegin(FacesContext context) throws IOException 
 public  void encodeChildren(FacesContext context) throws IOException 
 public  void encodeEnd(FacesContext context) throws IOException 
 public UIComponent findComponent(String id) 
 public MethodExpression getAttributeChangeListener() 
 public AttributeChangeListener[] getAttributeChangeListeners() 
 public Map getAttributes() 
 protected FacesBean.Type getBeanType() 
 protected boolean getBooleanProperty(PropertyKey key,
    boolean defaultValue) 
 public int getChildCount() 
 public List getChildren() 

    Create (if necessary) and return a List of the children associated with this component.

 public String getClientId(FacesContext context) 
 public String getContainerClientId(FacesContext context,
    UIComponent child) 
 public FacesBean getFacesBean() 
 protected FacesContext getFacesContext() 
 protected FacesListener[] getFacesListeners(Class clazz) 
 public UIComponent getFacet(String facetName) 
 public int getFacetCount() 
    Return the number of facets. This is more efficient than calling getFacets().size();
 public Iterator getFacetNames() 
    Returns an Iterator over the names of all facets. Unlike getFacets().keySet().iterator(), this does not require instantiating a Map if there are no facets. (Note that this is not part of the UIComponent API.)
 public Map getFacets() 

    Create (if necessary) and return a Map of the facets associated with this component.

 public Iterator getFacetsAndChildren() 
 abstract public String getFamily()
 public String getId() 
    Gets the identifier for the component.
 protected int getIntProperty(PropertyKey key,
    int defaultValue) 
 protected LifecycleRenderer getLifecycleRenderer(FacesContext context) 
 public UIComponent getParent() 
 protected Object getProperty(PropertyKey key) 
 protected PropertyKey getPropertyKey(String name) 
 protected Renderer getRenderer(FacesContext context) 
 public String getRendererType() 
 public boolean getRendersChildren() 
 public ValueBinding getValueBinding(String name) 
 public ValueExpression getValueExpression(String name) 
 public boolean isRendered() 
 public boolean isTransient() 
 public  void markInitialState() 
 public  void processDecodes(FacesContext context) 
 public  void processRestoreState(FacesContext context,
    Object state) 
 public Object processSaveState(FacesContext context) 
 public  void processUpdates(FacesContext context) 
 public  void processValidators(FacesContext context) 
 public  void queueEvent(FacesEvent event) 
 public  void removeAttributeChangeListener(AttributeChangeListener acl) 
 protected  void removeFacesListener(FacesListener listener) 
 public  void restoreState(FacesContext context,
    Object stateObj) 
 public Object saveState(FacesContext context) 
 public  void setAttributeChangeListener(MethodExpression mb) 
 public  void setAttributeChangeListener(MethodBinding mb) 
 protected  void setBooleanProperty(PropertyKey key,
    boolean value) 
 public  void setId(String id) 
    Sets the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML:
    • Must not be a zero-length String.
    • First character must be an ASCII letter (A-Za-z) or an underscore ('_').
    • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').
 protected  void setIntProperty(PropertyKey key,
    int value) 
 public  void setParent(UIComponent parent) 

    Set the parent UIComponent of this UIComponent.

 protected  void setProperty(PropertyKey key,
    Object value) 
 public  void setRendered(boolean rendered) 
 public  void setRendererType(String rendererType) 
 public  void setTransient(boolean newTransient) 
 public  void setValueBinding(String name,
    ValueBinding binding) 
 public  void setValueExpression(String name,
    ValueExpression expression) 
 public String toString() 
 protected final  void updateChildren(FacesContext context) 
    Delegates to LifecycleRenderer, if present, otherwise calls upateChildrenImpl.
 protected  void updateChildrenImpl(FacesContext context) 
 protected final  void validateChildren(FacesContext context) 
    Delegates to LifecycleRenderer, if present, otherwise calls validateChildrenImpl.
 protected  void validateChildrenImpl(FacesContext context) 
    Calls processValidators on all facets and children of this component.