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

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

public class SelectManyMenuBuilder
extends Builder

This Builder creates a ElementBean mapped to a html select Node by the SelectBuilderRule. The JSF component type for a multi-select is javax.faces.HtmlSelectManyMenu


Field Summary
 
Fields inherited from class org.apache.shale.clay.parser.builder.Builder
messages
 
Constructor Summary
SelectManyMenuBuilder()
           
 
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 the JSF component type of javax.faces.HtmlSelectManyMenu that will populate the target ElementBean.
protected  String getJsfid(Node node)
           Returns the jsfid for the target ElementBean.
 boolean isChildrenAllowed()
           Returns true indicating that the multi-select 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

SelectManyMenuBuilder

public SelectManyMenuBuilder()
Method Detail

getComponentType

protected String getComponentType(Node node)

Returns the JSF component type of javax.faces.HtmlSelectManyMenu 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 for the target ElementBean.

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

isChildrenAllowed

public boolean isChildrenAllowed()

Returns true indicating that the multi-select component can have children.

Overrides:
isChildrenAllowed in class Builder
Returns:
always 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 - current markup node
target - bean that will be build from the node
root - the parent of the target


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