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

java.lang.Object
  extended by org.apache.shale.clay.parser.builder.Builder
      extended by org.apache.shale.clay.parser.builder.JspIncludeDirectiveBuilder

public class JspIncludeDirectiveBuilder
extends Builder

Simulates a JSP include directive.include using the Clay component. For a "jsp:include" node, the child "param" nodes will be converted into symbols.


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
JspIncludeDirectiveBuilder()
           
 
Method Summary
protected  void encodeBegin(Node node, ElementBean target, ComponentBean root)
          Calls super to populate the target config bean with the html node's values.
protected  boolean getBuildNodeBody(Node node, ElementBean target)
          This builder handles converting the nodes's children.
protected  String getComponentType(Node node)
           Returns the JSF component type of org.apache.shale.clay.component.Clay that will populate the componentType property of the ElementBean being created.
protected  String getJsfid(Node node)
           Returns the jsfid associated with the ElementBean being build.
 boolean isChildrenAllowed()
           Returns a boolean value that will indicate if the target JSF component will support children.
 
Methods inherited from class org.apache.shale.clay.parser.builder.Builder
assignAttributes, assignNode, createAttribute, createElement, encode, encodeChildren, encodeEnd, getBuilder, getRenderId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspIncludeDirectiveBuilder

public JspIncludeDirectiveBuilder()
Method Detail

getJsfid

protected String getJsfid(Node node)

Returns the jsfid associated with the ElementBean being build.

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

getComponentType

protected String getComponentType(Node node)

Returns the JSF component type of org.apache.shale.clay.component.Clay that will populate the componentType property of the ElementBean being created.

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

isChildrenAllowed

public boolean isChildrenAllowed()

Returns a boolean value that will indicate if the target JSF component will support children.

Overrides:
isChildrenAllowed in class Builder
Returns:
true

encodeBegin

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

Calls super to populate the target config bean with the html node's values. When processing a "jsp:directive.include", the "file" attribute doesn't have a corresponding clay value so it will become a symbol aliased to clay's "clayJsfid" attribute. The same goes for the "jsp:include". The "page" symbol is aliased to the "clayJsfid" attribute. Nested "param" nodes are converted into symbols.

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

getBuildNodeBody

protected boolean getBuildNodeBody(Node node,
                                   ElementBean target)

This builder handles converting the nodes's children.

Overrides:
getBuildNodeBody in class Builder
Parameters:
node - markup node
target - config bean
Returns:
true indicating that children of the node should be ignored.


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