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

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

public class OutputLinkBuilder
extends Builder

This Builder will create a target ElementBean for a "<a>" Node. The mapping between the html and the builder is handled by the AnchorBuilderRule.


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

OutputLinkBuilder

public OutputLinkBuilder()
Method Detail

getComponentType

protected String getComponentType(Node node)

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

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

getJsfid

protected String getJsfid(Node node)

Returns a jsfid that will populate the target ElementBean.

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

isChildrenAllowed

public boolean isChildrenAllowed()

Returns true meaning 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)

Calls super to populate the target config bean with the html node's values. The "href" attribute doesn't have a corresponding outputLink value so it will become a symbol. If there is a "value" attribute, connect the component's "value" to the "@href" symbol.

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


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