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, realizeComponent
assignAttributes, createAttribute, encode, encodeChildren, encodeEnd, getBuildNodeBody, getRenderId
public 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 ElementBuilder
node
- markupprotected void addConverter(Node node, ElementBean target)
ElementBuilder
Adds a ConverterBean
to the target
ElementBean
using the Node
as the input source.
addConverter
in class ElementBuilder
node
- 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)
ElementBuilder
Adds a ValidatorBean
to the target
ElementBean
using the Node
as the input source.
addValidator
in class ElementBuilder
node
- markuptarget
- child config beanprotected void addActionListener(Node node, ElementBean target)
ElementBuilder
Adds an ActionListenerBean
to the target
ElementBean
using the Node
as the input source.
addActionListener
in class ElementBuilder
node
- markuptarget
- child config beanprotected void addValueChangeListener(Node node, ElementBean target)
ElementBuilder
Adds a ActionListenerBean
to the target
ElementBean
using the Node
as the input source.
addValueChangeListener
in class ElementBuilder
node
- 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 ElementBuilder
node
- 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 ElementBuilder
node
- 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 Builder
node
- markup nodeCopyright © 2004-2013 Apache Software Foundation. All Rights Reserved.