|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.shale.clay.parser.builder.Builder
org.apache.shale.clay.parser.builder.ElementBuilder
org.apache.shale.clay.parser.builder.JsfDefaultBuilder
public class JsfDefaultBuilder
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.
| Field Summary |
|---|
| Fields inherited from class org.apache.shale.clay.parser.builder.Builder |
|---|
messages |
| Constructor Summary | |
|---|---|
JsfDefaultBuilder()
|
|
| 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 |
addAttribute(Node node,
ElementBean target)
Adds markup <f:attribute> to the target
ElementBean. |
protected void |
addConverter(Node node,
ElementBean target)
Adds a ConverterBean
to the target ElementBean
using the Node as the input source. |
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)
Adds a ValidatorBean
to the target ElementBean
using the Node as the input source. |
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)
Adds a ActionListenerBean
to the target ElementBean
using the Node as the input source. |
ElementBean |
createElement(Node node)
Factory method that creates a ElementBean from a Node. |
protected void |
encodeBegin(Node node,
ElementBean target,
ComponentBean root)
Build's a target ElementBean from a Node. |
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)
Returns the jsfid from the Node The extends
attribute is giving the first order of evaluation. |
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. |
| Methods inherited from class org.apache.shale.clay.parser.builder.ElementBuilder |
|---|
addAttributes, addSymbols, assignNode, getComponentType, isChildrenAllowed, isNodeWhitespace, realizeComponent |
| Methods inherited from class org.apache.shale.clay.parser.builder.Builder |
|---|
assignAttributes, createAttribute, encode, encodeChildren, encodeEnd, getBuildNodeBody, getRenderId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsfDefaultBuilder()
| Method Detail |
|---|
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 ElementBuildernode - markup
protected 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 bean
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.
attributesNode - markuptarget - child config bean
protected 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 bean
protected 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 bean
protected 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 bean
protected void addSymbol(Node node,
ElementBean target)
Adds markup <clay:symbol> to the target
ElementBean.
node - markuptarget - child config bean
protected void addAttribute(Node node,
ElementBean target)
Adds markup <f:attribute> to the target
ElementBean.
node - markuptarget - child config bean
protected void addFacet(Node node,
ElementBean target)
Adds markup <f:facet> to the target's
child ElementBean.
node - markuptarget - child config bean
protected 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 - markup
public 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 node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||