org.apache.shale.clay.parser.builder
Class VerbatimBuilder

java.lang.Object
  extended by org.apache.shale.clay.parser.builder.Builder
      extended by org.apache.shale.clay.parser.builder.VerbatimBuilder
Direct Known Subclasses:
CommentBuilder

public class VerbatimBuilder
extends Builder

This is the default Builder that will create a ElementBean having characteristics like the JSP verbatim tag. All html elements that are not mapped to a specific Builder will be handled by the DefaultBuilderRule.


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
VerbatimBuilder()
           
 
Method Summary
protected  void assignAttributes(Node node, ComponentBean target)
          Skip the processing of attributes for a verbatim node.
protected  void encodeBegin(Node node, ElementBean target, ComponentBean root)
           Calls to the super implementation to populate the target ElementBean and then sets the value attribute to the raw text of the html node.
protected  void encodeEnd(Node node, ElementBean target, ComponentBean root)
           If the html node is well-formed, the create a ending html tag using another verbatim ElementBean.
protected  String getComponentType(Node node)
           Returns a JSF component type of javax.faces.HtmlOutputText.
protected  String getJsfid(Node node)
           Returns the jsfid for the target ElementBean.
 
Methods inherited from class org.apache.shale.clay.parser.builder.Builder
assignNode, createAttribute, createElement, encode, encodeChildren, getBuilder, getBuildNodeBody, getRenderId, isChildrenAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerbatimBuilder

public VerbatimBuilder()
Method Detail

getJsfid

protected String getJsfid(Node node)

Returns the jsfid for the target ElementBean.

Specified by:
getJsfid in class Builder
Parameters:
node - markup
Returns:
jsfid

encodeBegin

protected void encodeBegin(Node node,
                           ElementBean target,
                           ComponentBean root)

Calls to the super implementation to populate the target ElementBean and then sets the value attribute to the raw text of the html node. Set the escape attribute to false so that the special html characters will not be excaped

Overrides:
encodeBegin in class Builder
Parameters:
node - markup
target - child
root - parent

getComponentType

protected String getComponentType(Node node)

Returns a JSF component type of javax.faces.HtmlOutputText.

Specified by:
getComponentType in class Builder
Parameters:
node - markup
Returns:
component type

encodeEnd

protected void encodeEnd(Node node,
                         ElementBean target,
                         ComponentBean root)

If the html node is well-formed, the create a ending html tag using another verbatim ElementBean. Set the escape attribute to false so that the special html characters will not be escaped

Overrides:
encodeEnd in class Builder
Parameters:
node - markup
target - child
root - parent

assignAttributes

protected void assignAttributes(Node node,
                                ComponentBean target)

Skip the processing of attributes for a verbatim node. This was a bug uncovered with JSF RI 1.2. The TextRenderer is sensitive to pass thru attributes. If it finds a pass thru attribute, it wraps the text in a HTML span tag.

Overrides:
assignAttributes in class Builder
Parameters:
node - markup node
target - config bean built for the markup node


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.