|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.clay.parser.builder.Builder org.apache.shale.clay.parser.builder.ElementBuilder
public class ElementBuilder
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.
Field Summary |
---|
Fields inherited from class org.apache.shale.clay.parser.builder.Builder |
---|
messages |
Constructor Summary | |
---|---|
ElementBuilder()
|
Method Summary | |
---|---|
protected void |
addActionListener(Node node,
ElementBean target)
Adds an ActionListenerBean
to the target ElementBean
using the Node as the input source. |
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)
Adds a ConverterBean
to the target ElementBean
using the Node as the input source. |
protected void |
addSymbols(Node symbolsNode,
ElementBean target)
Adds markup symbols to the target
ElementBean . |
protected void |
addValidator(Node node,
ElementBean target)
Adds a ValidatorBean
to the target ElementBean
using the Node as the input source. |
protected void |
addValueChangeListener(Node node,
ElementBean target)
Adds a ActionListenerBean
to the target ElementBean
using the Node as the input source. |
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 . |
Methods inherited from class org.apache.shale.clay.parser.builder.Builder |
---|
assignAttributes, createAttribute, encode, encodeChildren, encodeEnd, getBuilder, getBuildNodeBody, getRenderId |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ElementBuilder()
Method Detail |
---|
protected String getJsfid(Node node)
Returns the jsfid
from the target HTML
Node
.
getJsfid
in class Builder
node
- markup
protected String getComponentType(Node node)
Returns the componentType
from the target HTML
Node
.
getComponentType
in class Builder
node
- markup
protected 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 Builder
node
- 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 Builder
node
- markup
public boolean isChildrenAllowed()
This override returns true
indicating that the from JSF
component can have children.
isChildrenAllowed
in class Builder
true
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.
assignNode
in class Builder
node
- 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 node
true
if value of the node is only whitespace
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |