Class CellValue

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sf.basedb.clients.web.taglib.table.CellValue
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class CellValue extends TagSupport
This tag adds a value to a cell in a row. It should be placed inside a <tbl:cell> tag.

Syntax:

   <tbl:cellvalue
      value=...
      list=...
      separator=...
      prefix=...
      suffix=...
      bulletlist=false|true
      clazz=...
      style=...
   >
Tag attributes
Attribute Default value Required Description
value - no A value to display in the cell. If a Formatter has been defined for this column the value is formatted otherwise it is just converted to a string with the toString() method.
list - no A list of values to display in the cell. Each value is formatted the same way as for a single value. If a single value is also specified it is printed first.
separator ; no A separator to use between each value in a list.
prefix no A prefix that is added before each value. Since 2.9.
suffix no A suffix that is added after each value. Since 2.9.
bulletlist false no A flag, that if it is set will display all values as <li> items inside a <ul> list. The separator setting is ignored, but prefix and suffix is applied to each value as usual. Since 3.19.9.
clazz no Optional class name. Generates an extra <span> tag around the value(s).
style no Optional style attributes. Generates an extra <span> tag around the value(s).
Version:
2.0
Author:
Nicklas
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • toStringFormatter

      private static final Formatter<Object> toStringFormatter
    • value

      private Object value
      The value to display.
    • list

      private Collection<?> list
    • prefix

      private String prefix
    • suffix

      private String suffix
    • separator

      private String separator
    • clazz

      private String clazz
    • style

      private String style
    • bulletlist

      private boolean bulletlist
  • Constructor Details

    • CellValue

      public CellValue()
  • Method Details

    • setValue

      public void setValue(Object value)
    • getValue

      public Object getValue()
    • setList

      public void setList(Collection<?> list)
    • getList

      public Iterable<?> getList()
    • setSeparator

      public void setSeparator(String separator)
    • getSeparator

      public String getSeparator()
    • setPrefix

      public void setPrefix(String prefix)
      Since:
      2.9
    • getPrefix

      public String getPrefix()
      Since:
      2.9
    • setSuffix

      public void setSuffix(String suffix)
      Since:
      2.9
    • getSuffix

      public String getSuffix()
      Since:
      2.9
    • getClazz

      public String getClazz()
      Since:
      3.11
    • setClazz

      public void setClazz(String clazz)
      Since:
      3.11
    • getStyle

      public String getStyle()
      Since:
      3.11
    • setStyle

      public void setStyle(String style)
      Since:
      3.11
    • setBulletlist

      public void setBulletlist(boolean bulletlist)
    • doStartTag

      public int doStartTag() throws JspException
      Specified by:
      doStartTag in interface Tag
      Overrides:
      doStartTag in class TagSupport
      Throws:
      JspException