Class Hierarchy All Classes All Fields and Methods

 

Class javax.faces.component.UIComponentBase

java.lang.Object
        javax.faces.component.UIComponent
                javax.faces.component.UIComponentBase

public abstract class UIComponentBase
extends UIComponent

UIComponentBase is a convenience base class that implements the default concrete behavior of all methods defined by UIComponent.

By default, this class defines getRendersChildren() to find the renderer for this component and call its getRendersChildren() method. The default implementation on the Renderer returns false. Subclasses that wish to manage the rendering of their children should override this method to return true instead.

Constructor Index
Constructor Description
UIComponentBase()  

Method Index
Method Description
void addFacesListener(FacesListener) Add the specified FacesListener to the set of listeners registered to receive event notifications from this UIComponent.
void broadcast(FacesEvent)  
void decode(FacesContext)  
void encodeBegin(FacesContext)  
void encodeChildren(FacesContext)  
void encodeEnd(FacesContext)  
UIComponent findComponent(String)  
Map getAttributes()  
int getChildCount()  
List getChildren()  
String getClientId(FacesContext)  
FacesContext getFacesContext()  
FacesListener[] getFacesListeners(Class)  
UIComponent getFacet(String)  
Map getFacets()  
Iterator getFacetsAndChildren()  
String getId()  
UIComponent getParent()  
Renderer getRenderer(FacesContext)  
String getRendererType()  
boolean getRendersChildren()  
ValueBinding getValueBinding(String)  
boolean isRendered()  
boolean isTransient()  
void processDecodes(FacesContext)  
void processRestoreState(FacesContext, Object)  
Object processSaveState(FacesContext)  
void processUpdates(FacesContext)  
void processValidators(FacesContext)  
void queueEvent(FacesEvent)  
void removeFacesListener(FacesListener) Remove the specified FacesListener from the set of listeners registered to receive event notifications from this UIComponent.
Object restoreAttachedState(FacesContext, Object) This method is called by UIComponent subclasses that need to restore the objects they saved using saveAttachedState.
void restoreState(FacesContext, Object)  
Object saveAttachedState(FacesContext, Object) This method is called by UIComponent subclasses that want to save one or more attached objects.
Object saveState(FacesContext)  
void setId(String)  
void setParent(UIComponent)  
void setRendered(boolean)  
void setRendererType(String)  
void setTransient(boolean)  
void setValueBinding(String, ValueBinding)  

 

Constructors

 

UIComponentBase

public UIComponentBase() 

 

Methods

 

addFacesListener

protected void addFacesListener(FacesListener listener) 

Add the specified FacesListener to the set of listeners registered to receive event notifications from this UIComponent. It is expected that UIComponent classes acting as event sources will have corresponding typesafe APIs for registering listeners of the required type, and the implementation of those registration methods will delegate to this method. For example:

 public class FooEvent extends FacesEvent {
   ...
   protected boolean isAppropriateListener(FacesListener listener) {
     return (listener instanceof FooListener);
   }
   protected void processListener(FacesListener listener) {
     ((FooListener) listener).processFoo(this);
   }
   ...
 }

 public interface FooListener extends FacesListener {
   public void processFoo(FooEvent event);
 }

 public class FooComponent extends UIComponentBase {
   ...
   public void addFooListener(FooListener listener) {
     addFacesListener(listener);
   }
   public void removeFooListener(FooListener listener) {
     removeFacesListener(listener);
   }
   ...
 }
 

 

broadcast

public void broadcast(FacesEvent event) throws AbortProcessingException

 

decode

public void decode(FacesContext context) 

 

encodeBegin

public void encodeBegin(FacesContext context) throws IOException

 

encodeChildren

public void encodeChildren(FacesContext context) throws IOException

 

encodeEnd

public void encodeEnd(FacesContext context) throws IOException

 

findComponent

public UIComponent findComponent(String expr) 

 

getAttributes

public Map getAttributes() 

 

getChildCount

public int getChildCount() 

 

getChildren

public List getChildren() 

 

getClientId

public String getClientId(FacesContext context) 

 

getFacesContext

protected FacesContext getFacesContext() 

 

getFacesListeners

protected FacesListener[] getFacesListeners(Class clazz) 

 

getFacet

public UIComponent getFacet(String name) 

 

getFacets

public Map getFacets() 

 

getFacetsAndChildren

public Iterator getFacetsAndChildren() 

 

getId

public String getId() 

 

getParent

public UIComponent getParent() 

 

getRenderer

protected Renderer getRenderer(FacesContext context) 

 

getRendererType

public String getRendererType() 

 

getRendersChildren

public boolean getRendersChildren() 

 

getValueBinding

public ValueBinding getValueBinding(String name) 

 

isRendered

public boolean isRendered() 

 

isTransient

public boolean isTransient() 

 

processDecodes

public void processDecodes(FacesContext context) 

 

processRestoreState

public void processRestoreState(FacesContext context,
                                Object state) 

 

processSaveState

public Object processSaveState(FacesContext context) 

 

processUpdates

public void processUpdates(FacesContext context) 

 

processValidators

public void processValidators(FacesContext context) 

 

queueEvent

public void queueEvent(FacesEvent event) 

 

removeFacesListener

protected void removeFacesListener(FacesListener listener) 

Remove the specified FacesListener from the set of listeners registered to receive event notifications from this UIComponent.

 

restoreAttachedState

public static Object restoreAttachedState(FacesContext context,
                                          Object stateObj) throws IllegalStateException

This method is called by UIComponent subclasses that need to restore the objects they saved using saveAttachedState. This method is tightly coupled with saveAttachedState.

This method supports restoring all attached objects types supported by saveAttachedState.

 

restoreState

public void restoreState(FacesContext context,
                         Object state) 

 

saveAttachedState

public static Object saveAttachedState(FacesContext context,
                                       Object attachedObject) 

This method is called by UIComponent subclasses that want to save one or more attached objects. It is a convenience method that does the work of saving attached objects that may or may not implement the StateHolder interface. Using this method implies the use of restoreAttachedState to restore the attached objects.

This method supports saving attached objects of the following type: Objects, null values, and Lists of these objects. If any contained objects are not Lists and do not implement StateHolder, they must have zero-argument public constructors. The exact structure of the returned object is undefined and opaque, but will be serializable.

 

saveState

public Object saveState(FacesContext context) 

 

setId

public void setId(String id) 

 

setParent

public void setParent(UIComponent parent) 

 

setRendered

public void setRendered(boolean rendered) 

 

setRendererType

public void setRendererType(String rendererType) 

 

setTransient

public void setTransient(boolean transientFlag) 

 

setValueBinding

public void setValueBinding(String name,
                            ValueBinding binding) 

Class Hierarchy All Classes All Fields and Methods