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

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

public class SelectOneMenuBuilder
extends Builder

This Builder will create a target ElementBean for a single select html Node. The mapping between the html and the builder is handled by the SelectBuilderRule.


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
SelectOneMenuBuilder()
           
 
Method Summary
protected  void encodeBegin(Node node, ElementBean target, ComponentBean root)
          Remove any child nodes that are not "option" nodes.
protected  String getComponentType(Node node)
           Returns a JSF component type of javax.faces.HtmlSelectOneMenu that will populate the target ElementBean.
protected  String getJsfid(Node node)
           Returns the jsfid that will populate the target ElementBean.
 boolean isChildrenAllowed()
           Returns a true value indicating that the target JSF component can have children.
 
Methods inherited from class org.apache.shale.clay.parser.builder.Builder
assignAttributes, assignNode, createAttribute, createElement, encode, encodeChildren, encodeEnd, getBuilder, getBuildNodeBody, getRenderId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectOneMenuBuilder

public SelectOneMenuBuilder()
Method Detail

getComponentType

protected String getComponentType(Node node)

Returns a JSF component type of javax.faces.HtmlSelectOneMenu that will populate the target ElementBean.

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

getJsfid

protected String getJsfid(Node node)

Returns the jsfid that will populate the target ElementBean.

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

isChildrenAllowed

public boolean isChildrenAllowed()

Returns a true value indicating that the target JSF component can have children.

Overrides:
isChildrenAllowed in class Builder
Returns:
true

encodeBegin

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

Remove any child nodes that are not "option" nodes.

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


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