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

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

public class SelectItemBuilder
extends Builder

This Builder will create a ElementBean that will be used to create a single html option element. The OptionBuilderRule will handle mapping the html element to this builder.


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
SelectItemBuilder()
           
 
Method Summary
protected  void encodeBegin(Node node, ElementBean target, ComponentBean root)
           The default for a single option is to look at the next html node to find the label.
protected  boolean getBuildNodeBody(Node node, ElementBean target)
          Returns true by default meaning that the parent will render children.
protected  String getComponentType(Node node)
           Returns the JSF component type of javax.faces.SelectItem that will populate a ElementBean and create an html option.
protected  String getJsfid(Node node)
           Returns a jsfid that will be set on the target ElementBean.
 
Methods inherited from class org.apache.shale.clay.parser.builder.Builder
assignAttributes, assignNode, createAttribute, createElement, encode, encodeChildren, encodeEnd, getBuilder, getRenderId, isChildrenAllowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectItemBuilder

public SelectItemBuilder()
Method Detail

getJsfid

protected String getJsfid(Node node)

Returns a jsfid that will be set on the target ElementBean.

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

getComponentType

protected String getComponentType(Node node)

Returns the JSF component type of javax.faces.SelectItem that will populate a ElementBean and create an html option.

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

encodeBegin

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

The default for a single option is to look at the next html node to find the label.

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

getBuildNodeBody

protected boolean getBuildNodeBody(Node node,
                                   ElementBean target)

Returns true by default meaning that the parent will render children.

Overrides:
getBuildNodeBody in class Builder
Parameters:
node - markup
target - child config bean
Returns:
false if the node's children should be ignored


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