org.loom.tags.core
Class OutTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.SimpleTagSupport
      extended by org.loom.tags.AbstractTag
          extended by org.loom.tags.core.AbstractOutTag
              extended by org.loom.tags.core.OutTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.SimpleTag, LoomTag

@Tag(dynamicAttributes=true,
     bodyContent=SCRIPTLESS,
     example="<l:out value=\"foo\"/>\n<l:out value=\"add\"\n\tif=\"${!l:contains(items, item)}\"\n\telse=\"remove\"\n/>")
public class OutTag
extends AbstractOutTag

Translates and prints a value. It is typically used to print locale-specific output, but also includes limited support for simple if-else clauses.


Field Summary
 
Fields inherited from class org.loom.tags.AbstractTag
expressionLanguageProxy, loomServletRequestFactory, out, repository, request, response
 
Constructor Summary
OutTag()
           
 
Method Summary
protected  java.lang.String getDisplayValue()
           
 java.lang.String getElse()
           
 java.lang.String getValue()
           
 void setElse(java.lang.String elseClause)
          If the if clause is false and else is not null, print else instead of value
 void setValue(java.lang.String value)
           
 
Methods inherited from class org.loom.tags.core.AbstractOutTag
doTagImpl, getVar, isEscapeHtml, isIf, isTranslate, setEscapeHtml, setIf, setScope, setTranslate, setVar
 
Methods inherited from class org.loom.tags.AbstractTag
createWriterWrapper, doBody, doBufferedBody, doTag, endTag, evaluateExpression, getActionProperty, getAncestorWithClass, getBufferedBody, getExtendedAttributes, getMessagesRepository, getPageContext, getRequest, getResponse, getScopedAttribute, getWriter, initTag, printParentAttributes, removeScopedAttribute, setDynamicAttribute, setExtendedAttribute, setJspContext, setRequest, setResponse, setScopedAttribute, setWriter
 
Methods inherited from class javax.servlet.jsp.tagext.SimpleTagSupport
findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutTag

public OutTag()
Method Detail

getDisplayValue

protected java.lang.String getDisplayValue()
                                    throws javax.servlet.jsp.JspException
Specified by:
getDisplayValue in class AbstractOutTag
Returns:
the value that should get displayed
Throws:
javax.servlet.jsp.JspException

getElse

public java.lang.String getElse()

getValue

public java.lang.String getValue()

setElse

@Attribute
public void setElse(java.lang.String elseClause)
If the if clause is false and else is not null, print else instead of value


setValue

public void setValue(java.lang.String value)