org.loom.tags.decorator
Class ReadOnlyDecorator<T extends AbstractFormInputTag>

java.lang.Object
  extended by org.loom.tags.decorator.AbstractLoomDecorator<T>
      extended by org.loom.tags.decorator.ReadOnlyDecorator<T>
All Implemented Interfaces:
TagDecorator<T>

public class ReadOnlyDecorator<T extends AbstractFormInputTag>
extends AbstractLoomDecorator<T>

Renders the field as text, prepended with a span mimicking the label.


Constructor Summary
ReadOnlyDecorator()
           
 
Method Summary
 void afterDoTag(T tag)
           
 boolean beforeDoTag(T tag)
           
protected  boolean skipTag(T tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadOnlyDecorator

public ReadOnlyDecorator()
Method Detail

beforeDoTag

public boolean beforeDoTag(T tag)
                    throws java.io.IOException,
                           javax.servlet.jsp.JspException
Specified by:
beforeDoTag in interface TagDecorator<T extends AbstractFormInputTag>
Specified by:
beforeDoTag in class AbstractLoomDecorator<T extends AbstractFormInputTag>
Returns:
true to execute the tag afterwards, false to skip the tag. If false, the afterDoTag method will not be triggered.
Throws:
java.io.IOException
javax.servlet.jsp.JspException

skipTag

protected boolean skipTag(T tag)
Returns:
true if this tag must be skipped, because a read-only form should not show it

afterDoTag

public void afterDoTag(T tag)
                throws java.io.IOException,
                       javax.servlet.jsp.JspException
Specified by:
afterDoTag in interface TagDecorator<T extends AbstractFormInputTag>
Specified by:
afterDoTag in class AbstractLoomDecorator<T extends AbstractFormInputTag>
Throws:
java.io.IOException
javax.servlet.jsp.JspException