public class JsfDefaultBuilder extends ElementBuilder
A generic builder that maps the markup node name to the jsfid. The extends attribute can be used to override the default mapping to provide meta-data inheritance. The builder handles child nodes common to JSF and shale components.
| Constructor and Description |
|---|
JsfDefaultBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addActionListener(Node node,
ElementBean target)
|
protected void |
addAttribute(Node node,
ElementBean target)
Adds markup <f:attribute> to the
target
ElementBean. |
protected void |
addConverter(Node node,
ElementBean target)
|
protected void |
addFacet(Node node,
ElementBean target)
Adds markup <f:facet> to the
target's
child ElementBean. |
protected void |
addSymbol(Node node,
ElementBean target)
Adds markup <clay:symbol> to the
target
ElementBean. |
protected void |
addValidator(Node node,
ElementBean target)
|
protected void |
addValidatorVar(Node attributesNode,
ComponentBean target)
Looks for <s:validatorVar/> nodes within a <s:commonsValidator> node and
converting them to
AttributeBean's
on the target ComponentBean. |
protected void |
addValueChangeListener(Node node,
ElementBean target)
|
ElementBean |
createElement(Node node)
Factory method that creates a
ElementBean from a Node. |
protected void |
encodeBegin(Node node,
ElementBean target,
ComponentBean root)
|
Builder |
getBuilder(Node node)
Returns the
Builder that
is assigned the task of converting the html node to a corresponding component
metadata used to construct a JSF resource. |
protected String |
getJsfid(Node node)
|
String |
getPrefix()
Returns the namespace prefix that will be added to the
node name when resolving the clay config.
|
void |
setPrefix(String prefix)
Sets the namespace preix that will override the template
nodeds qname.
|
addAttributes, addSymbols, assignNode, getComponentType, isChildrenAllowed, isNodeWhitespace, realizeComponentassignAttributes, createAttribute, encode, encodeChildren, encodeEnd, getBuildNodeBody, getRenderIdpublic String getPrefix()
Returns the namespace prefix that will be added to the node name when resolving the clay config.
public void setPrefix(String prefix)
Sets the namespace preix that will override the template nodeds qname.
prefix - URI prefixpublic ElementBean createElement(Node node)
Factory method that creates a ElementBean from a Node.
createElement in class ElementBuildernode - markupprotected void addConverter(Node node, ElementBean target)
ElementBuilderAdds a ConverterBean
to the target ElementBean
using the Node as the input source.
addConverter in class ElementBuildernode - markuptarget - child config beanprotected void addValidatorVar(Node attributesNode, ComponentBean target)
Looks for <s:validatorVar/> nodes within a <s:commonsValidator> node and
converting them to AttributeBean's
on the target ComponentBean.
attributesNode - markuptarget - child config beanprotected void addValidator(Node node, ElementBean target)
ElementBuilderAdds a ValidatorBean
to the target ElementBean
using the Node as the input source.
addValidator in class ElementBuildernode - markuptarget - child config beanprotected void addActionListener(Node node, ElementBean target)
ElementBuilderAdds an ActionListenerBean
to the target ElementBean
using the Node as the input source.
addActionListener in class ElementBuildernode - markuptarget - child config beanprotected void addValueChangeListener(Node node, ElementBean target)
ElementBuilderAdds a ActionListenerBean
to the target ElementBean
using the Node as the input source.
addValueChangeListener in class ElementBuildernode - markuptarget - child config beanprotected void addSymbol(Node node, ElementBean target)
Adds markup <clay:symbol> to the target
ElementBean.
node - markuptarget - child config beanprotected void addAttribute(Node node, ElementBean target)
Adds markup <f:attribute> to the target
ElementBean.
node - markuptarget - child config beanprotected void addFacet(Node node, ElementBean target)
Adds markup <f:facet> to the target's
child ElementBean.
node - markuptarget - child config beanprotected void encodeBegin(Node node, ElementBean target, ComponentBean root)
Build's a target ElementBean from a Node. The
following child nodes are handles outside of the encodeChildren
method: symbol, facet, attribute, convert, validate, actionListener,
and valueChangeListener.
encodeBegin in class ElementBuildernode - markuptarget - child config beanroot - parent config beanprotected String getJsfid(Node node)
Returns the jsfid from the Node The extends
attribute is giving the first order of evaluation. If empty, the node's
name is assigned to the jsfid.
getJsfid in class ElementBuildernode - markuppublic Builder getBuilder(Node node)
Returns the Builder that
is assigned the task of converting the html node to a corresponding component
metadata used to construct a JSF resource.
getBuilder in class Buildernode - markup nodeCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.