|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase org.apache.shale.clay.component.Clay
public class Clay
This component grafts a subview onto the current JSF view.
Constructor Summary | |
---|---|
Clay()
|
Method Summary | |
---|---|
void |
encodeBegin(javax.faces.context.FacesContext context)
This is where the clay component loads the root ComponentBean by
calling the
getRootElement() method or while invoking the shapeValidator callback event. |
void |
encodeChildren(javax.faces.context.FacesContext context)
Called by JSF, this method delegates to recursiveRenderChildren . |
void |
encodeEnd(javax.faces.context.FacesContext context)
Called by JSF, this method simply emits a logging statement if tracing is enabled. |
protected Catalog |
getCatalog()
Loads the chains config using the resource defined by config file Globals.CLAY_RESOURCE_NAME . |
String |
getClayJsfid()
Returns the unique identifier used to build the component subtree. |
protected ComponentBean |
getDisplayElementRoot()
Returns the root ComponentBean used to build the clay subtree
component. |
String |
getFamily()
|
String |
getJsfid()
Returns the unique identifier used to build the component subtree. |
String |
getManagedBeanName()
Returns the logical bean name that replaces any occurance of "@managed-bean-name" within a binding expression. |
boolean |
getRendersChildren()
Returns true indicating that this
component renders it's children. |
protected ComponentBean |
getRootElement()
Returns the root metadata component that is used to add to the component tree. |
String |
getShapeValidator()
Retuns the validator signature event that is invoked when
the component metadata is retrieved. |
Map |
getSymbols()
Returns the symbol table for the component. |
protected void |
recursiveRenderChildren(javax.faces.component.UIComponent child,
javax.faces.context.FacesContext context)
Recursively invokes the rendering of the sub component tree. |
void |
restoreState(javax.faces.context.FacesContext context,
Object obj)
Restores a component's state. |
Object |
saveState(javax.faces.context.FacesContext context)
Saves a component's state. |
void |
setClayJsfid(String jsfid)
Sets the unique identifier used to build the component subtree. |
protected void |
setDisplayElementRoot(ComponentBean displayElementRoot)
Sets the root ComponentBean used to build the clay subtree
component. |
void |
setJsfid(String jsfid)
Sets the unique identifier used to build the component subtree. |
void |
setManagedBeanName(String mbeanMnemonic)
Sets the logical bean name that replaces any occurrences of "@managed-bean-name" within a binding expression. |
void |
setShapeValidator(String loadShapeAction)
Sets the validator signature event that is invoked when
the component metadata is retrieved. |
Methods inherited from class javax.faces.component.UIComponentBase |
---|
addFacesListener, broadcast, decode, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, 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 |
Constructor Detail |
---|
public Clay()
Method Detail |
---|
public Map getSymbols()
Returns the symbol table for the component.
SymbolBean
protected Catalog getCatalog() throws Exception
Loads the chains config using the resource defined by config file
Globals.CLAY_RESOURCE_NAME
. These chain commands are used
to build the clay component subtree from a root ComponentBean
obtained for a ConfigBean
instance from the
ConfigBeanFactory
.
Catalog
instance of a catalog defined by catalog
Globals.CLAY_CATALOG_NAME
Exception
- loading catalogpublic String getJsfid()
Returns the unique identifier used to build the component subtree.
public void setJsfid(String jsfid)
Sets the unique identifier used to build the component subtree.
jsfid
- root identifier of the sub treepublic void setClayJsfid(String jsfid)
Sets the unique identifier used to build the component subtree. This property is not accessible from the JSP tag.
jsfid
- alias to the jsfid propertypublic String getClayJsfid()
Returns the unique identifier used to build the component subtree. This property is not accessible from the JSP tag.
public String getShapeValidator()
Retuns the validator
signature event that is invoked when
the component metadata is retrieved.
public void setShapeValidator(String loadShapeAction)
Sets the validator
signature event that is invoked when
the component metadata is retrieved.
loadShapeAction
- method binding expressionpublic String getManagedBeanName()
Returns the logical bean name that replaces any occurance of "@managed-bean-name" within a binding expression.
public void setManagedBeanName(String mbeanMnemonic)
Sets the logical bean name that replaces any occurrences of "@managed-bean-name" within a binding expression.
mbeanMnemonic
- managed bean symbolprotected ComponentBean getRootElement()
Returns the root metadata component that is used to add to the component
tree. It locates the ComponentBean
using the jsfid
attribute as the key. A call to the ConfigBeanFactory
locates the
correct ConfigBean
used to find the ComponentBean
.
public void encodeBegin(javax.faces.context.FacesContext context) throws IOException
This is where the clay component loads the root ComponentBean
by
calling the
getRootElement()
method or while invoking the shapeValidator
callback event.
The subtree is created using the Globals.ADD_COMPONENT_COMMAND_NAME
from the
Globals.CLAY_CATALOG_NAME
in the Globals.CLAY_RESOURCE_NAME
.
encodeBegin
in class javax.faces.component.UIComponentBase
context
- faces context
IOException
- render errorprotected void recursiveRenderChildren(javax.faces.component.UIComponent child, javax.faces.context.FacesContext context) throws IOException
Recursively invokes the rendering of the sub component tree.
child
- faces componentcontext
- faces context
IOException
- render errorpublic void encodeChildren(javax.faces.context.FacesContext context) throws IOException
Called by JSF, this method delegates to recursiveRenderChildren
.
encodeChildren
in class javax.faces.component.UIComponentBase
context
- faces context
IOException
- render errorpublic void encodeEnd(javax.faces.context.FacesContext context) throws IOException
Called by JSF, this method simply emits a logging statement if tracing is enabled.
encodeEnd
in class javax.faces.component.UIComponentBase
context
- faces context
IOException
- render errorprotected ComponentBean getDisplayElementRoot()
Returns the root ComponentBean
used to build the clay subtree
component.
protected void setDisplayElementRoot(ComponentBean displayElementRoot)
Sets the root ComponentBean
used to build the clay subtree
component.
displayElementRoot
- root config beanpublic void restoreState(javax.faces.context.FacesContext context, Object obj)
Restores a component's state.
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
context
- faces contextobj
- component statepublic Object saveState(javax.faces.context.FacesContext context)
Saves a component's state.
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
context
- faces context
StateHolder.saveState(javax.faces.context.FacesContext)
public boolean getRendersChildren()
Returns true
indicating that this
component renders it's children. That means JSF will
invoke encodeChildren()
method.
getRendersChildren
in class javax.faces.component.UIComponentBase
true
public String getFamily()
getFamily
in class javax.faces.component.UIComponent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |