org.apache.taglibs.dbtags.resultset
Class GetNumberTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended byorg.apache.taglibs.dbtags.resultset.BaseGetterTag
          extended byorg.apache.taglibs.dbtags.resultset.GetNumberTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class GetNumberTag
extends BaseGetterTag

Translates any SQL number to a readable String.

JSP Tag Lib Descriptor

   <tag>
     <name>getNumber</name>
     <tagclass>org.apache.taglibs.dbtags.resultset.GetNumberTag</tagclass>
     <teiclass>org.apache.taglibs.dbtags.resultset.BaseGetterTEI</teiclass>
     <bodycontent>empty</bodycontent>
     <info>
     Similar to getColumn, but provides more precise control over
     number formatting.  
     
     The "format" attribute can be either a pattern as
     accepted by the DecimalFormat constructor or a style: "CURRENCY", 
     "PERCENT" or "NUMBER".  
     
     The "locale" attribute can have one to three 
     components as accepted by the Locale constructor: language,
     country and variant. They are separated by "_".
     
     If neither the format nor locale attribute is set, output should be
     identical to getColumn.
     </info>
     <attribute>
       <name>position</name>
       <required>false</required>
       <rtexprvalue>false</rtexprvalue>
     </attribute>
     <attribute>
       <name>colName</name>
       <required>false</required>
       <rtexprvalue>false</rtexprvalue>
     </attribute>
     <attribute>
       <name>to</name>
       <required>false</required>
       <rtexprvalue>false</rtexprvalue>
     </attribute>
     <attribute>
       <name>scope</name>
       <required>false</required>
       <rtexprvalue>false</rtexprvalue>
     </attribute>
     <attribute>
       <name>locale</name>
       <required>false</required>
       <rtexprvalue>true</rtexprvalue>
     </attribute>
     <attribute>
       <name>format</name>
       <required>false</required>
       <rtexprvalue>true</rtexprvalue>
     </attribute>
   </tag>
 

Author:
Morgan Delagrange, Marius Scurtescu
See Also:
Serialized Form

Field Summary
protected  java.lang.String _format
           
 
Fields inherited from class org.apache.taglibs.dbtags.resultset.BaseGetterTag
_attributeName, _locale, _metaData, _scope, _tag
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GetNumberTag()
           
 
Method Summary
 int doStartTag()
           
 void release()
           
 void setFormat(java.lang.String strFormat)
           
 
Methods inherited from class org.apache.taglibs.dbtags.resultset.BaseGetterTag
doEndTag, getLocale, getMetaData, getPosition, getResultSet, getResultSetTag, setAttribute, setColName, setLocale, setPosition, setPosition, setScope, setTo
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_format

protected java.lang.String _format
Constructor Detail

GetNumberTag

public GetNumberTag()
Method Detail

setFormat

public void setFormat(java.lang.String strFormat)

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Throws:
javax.servlet.jsp.JspTagException

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class BaseGetterTag


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.