public class ElementBuilder extends Builder
This class handles building the ElementBean's
from the html markup resembling the <attributes> node in the clay
DTD, http://shale.apache.org/dtds/clay-config_1_0.dtd.
| Constructor and Description |
|---|
ElementBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addActionListener(Node node,
ElementBean target)
|
protected void |
addAttributes(Node attributesNode,
ComponentBean target)
Looks for <set/> nodes within a <attributes> node and
converting them to
AttributeBean's
on the target ComponentBean. |
protected void |
addConverter(Node node,
ElementBean target)
|
protected void |
addSymbols(Node symbolsNode,
ElementBean target)
|
protected void |
addValidator(Node node,
ElementBean target)
|
protected void |
addValueChangeListener(Node node,
ElementBean target)
|
protected void |
assignNode(Node node,
ElementBean target)
This method resolves the
jsfid attribute for an HTML
element to a component definition in the XML configuration files. |
ElementBean |
createElement(Node node)
This method is overridden to look for a
renderId
attribute in the Node. |
protected void |
encodeBegin(Node node,
ElementBean target,
ComponentBean root)
Handles converting markup resembling the <element> node
in the clay DTD, http://shale.apache.org/dtds/clay-config_1_0.dtd,
to the target
ElementBean. |
protected String |
getComponentType(Node node)
Returns the
componentType from the target HTML
Node. |
protected String |
getJsfid(Node node)
Returns the
jsfid from the target HTML
Node. |
boolean |
isChildrenAllowed()
This override returns
true indicating that the from JSF
component can have children. |
protected boolean |
isNodeWhitespace(Node node)
Test the value of the node and returns
true if
the value is only whitespace. |
protected void |
realizeComponent(Node node,
ComponentBean target)
Realizes the inheritance of the
target
ComponentBean and
and then applies attributes that are optionally nested
under the node. |
assignAttributes, createAttribute, encode, encodeChildren, encodeEnd, getBuilder, getBuildNodeBody, getRenderIdprotected String getComponentType(Node node)
Returns the componentType from the target HTML
Node.
getComponentType in class Buildernode - markupprotected void addConverter(Node node, ElementBean target)
Adds a ConverterBean
to the target ElementBean
using the Node as the input source.
node - markuptarget - child config beanprotected void addValidator(Node node, ElementBean target)
Adds a ValidatorBean
to the target ElementBean
using the Node as the input source.
node - markuptarget - child config beanprotected void addActionListener(Node node, ElementBean target)
Adds an ActionListenerBean
to the target ElementBean
using the Node as the input source.
node - markuptarget - child config beanprotected void addValueChangeListener(Node node, ElementBean target)
Adds a ActionListenerBean
to the target ElementBean
using the Node as the input source.
node - markuptarget - child config beanprotected void realizeComponent(Node node, ComponentBean target)
Realizes the inheritance of the target
ComponentBean and
and then applies attributes that are optionally nested
under the node.
node - markuptarget - child config beanprotected void addAttributes(Node attributesNode, ComponentBean target)
Looks for <set/> nodes within a <attributes> node and
converting them to AttributeBean's
on the target ComponentBean.
attributesNode - markuptarget - child config beanprotected void addSymbols(Node symbolsNode, ElementBean target)
Adds markup symbols to the target
ElementBean.
symbolsNode - markuptarget - child config beanprotected void encodeBegin(Node node, ElementBean target, ComponentBean root)
Handles converting markup resembling the <element> node
in the clay DTD, http://shale.apache.org/dtds/clay-config_1_0.dtd,
to the target ElementBean.
encodeBegin in class Buildernode - markuptarget - child config beanroot - parent config beanpublic ElementBean createElement(Node node)
This method is overridden to look for a renderId
attribute in the Node.
If one exists, it is applied to the target
ElementBean. The
super class Builder generates a unique id by default.
The clay namespace HTML nodes can override the renderId to
allow overridding of nested elements.
createElement in class Buildernode - markuppublic boolean isChildrenAllowed()
This override returns true indicating that the from JSF
component can have children.
isChildrenAllowed in class Buildertrueprotected void assignNode(Node node, ElementBean target)
This method resolves the jsfid attribute for an HTML
element to a component definition in the XML configuration files.
assignNode in class Buildernode - markuptarget - child config beanprotected boolean isNodeWhitespace(Node node)
Test the value of the node and returns true if
the value is only whitespace.
node - markup nodetrue if value of the node is only whitespaceCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.