|
||||||||||
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.VerbatimBuilder org.apache.shale.clay.parser.builder.CommentBuilder
public class CommentBuilder
This Builder
will render a HTML Node
as
an HTML comment. All nodes under the comment will be concatenated
as their original raw text value within the HTML document.
Field Summary |
---|
Fields inherited from class org.apache.shale.clay.parser.builder.Builder |
---|
messages |
Constructor Summary | |
---|---|
CommentBuilder()
|
Method Summary | |
---|---|
protected void |
captureComment(Node node,
StringBuffer commentBody)
Recursively traverses the children of the HTML Node concatenating
the raw text of each Token
into the commentBody . |
protected void |
encodeBegin(Node node,
ElementBean target,
ComponentBean root)
The super implementation is invoked to build a target ElementBean . |
protected void |
encodeEnd(Node node,
ElementBean target,
ComponentBean root)
This override cancels the super implementation. |
protected boolean |
getBuildNodeBody(Node node,
ElementBean target)
This method is overridden to return a true value indicating
that this Builder will handle child nodes under the
associated HTML Node . |
Methods inherited from class org.apache.shale.clay.parser.builder.VerbatimBuilder |
---|
assignAttributes, getComponentType, getJsfid |
Methods inherited from class org.apache.shale.clay.parser.builder.Builder |
---|
assignNode, createAttribute, createElement, encode, encodeChildren, getBuilder, getRenderId, isChildrenAllowed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommentBuilder()
Method Detail |
---|
protected boolean getBuildNodeBody(Node node, ElementBean target)
This method is overridden to return a true
value indicating
that this Builder
will handle child nodes under the
associated HTML Node
. This method can easily be confused
with the isChildrenAllowed()
method of the super
class Builder
. The distinction is that the
isChildrenAllowed()
method signifies that the
associated JSF component supports children components. This method
signifies that this builder will handle building child nodes
similarly to the jsf component's getRendersChildren()
method.
getBuildNodeBody
in class Builder
node
- markuptarget
- child config bean
true
protected void encodeBegin(Node node, ElementBean target, ComponentBean root)
The super implementation is invoked to build a target
ElementBean
.
The body of the comment is constructed by capturing the text
of all child HTML nodes within the comment body.
encodeBegin
in class VerbatimBuilder
node
- markuptarget
- child config beanroot
- parent config beanprotected void captureComment(Node node, StringBuffer commentBody)
Recursively traverses the children of the HTML
Node
concatenating
the raw text of each Token
into the commentBody
.
node
- markupcommentBody
- concatenated child node's raw textprotected void encodeEnd(Node node, ElementBean target, ComponentBean root)
This override cancels the super implementation. The overridden method handles the ending comment tag, "-->".
encodeEnd
in class VerbatimBuilder
node
- markuptarget
- child config beanroot
- parent config bean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |