org.apache.shale.clay.parser.builder.chain
Class InputBuilderRule

java.lang.Object
  extended by org.apache.shale.clay.parser.builder.chain.InputBuilderRule
All Implemented Interfaces:
Command

public class InputBuilderRule
extends Object
implements Command

This rule Command has an implied mapping to several html element types. The associated Builder will be returned regardless of the jsfid.


Field Summary
 
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE
 
Constructor Summary
InputBuilderRule()
           
 
Method Summary
 boolean execute(Context context)
           If the html Node is a input element, return the correct builder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputBuilderRule

public InputBuilderRule()
Method Detail

execute

public boolean execute(Context context)
                throws Exception

If the html Node is a input element, return the correct builder. If a match is found, the chain is ended.

Input type attribute to Builder
text InputTextBuilder
checkbox SelectBooleanCheckboxBuilder
raido SelectOneRadioBuilder
submitCommandButtonBuilder

The BuilderRuleContext will hold the current html Node and target Builder.

Specified by:
execute in interface Command
Parameters:
context - common chains context
Returns:
true if the chain is done
Throws:
Exception - checked exception


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