2.17.2: 2011-06-17

net.sf.basedb.clients.web.taglib.table
Class Form

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

public class Form
extends TagSupport

An alternative layout for tables which contains only one row. The table and columns should be defined as usual. Values for the columns are also set with the <tbl:cell> tag as asual.

This layout shows the "row" as a pair of left-right-oriented header/value pair. The default width is 1 which means that the header/value are stacked vertically. The width can be increased to get several "columns" of header/value pairs.

This layout was developed because we needed to support a form-based layout were the order and visibility of the header/values can be modified by the user. With this layout the same configuration dialog that is used for normal tables can be used.

Syntax:

   <tbl:form
        width=...
   >
        <tbl:cell>...</tbl:cell>
   </tbl:form>

Attribute Default value Required Description
width 1 no The number of columns (header/value) pairs in the form.

Version:
2.14
Author:
Nicklas
See Also:
Serialized Form
Last modified
$Date: 2009-09-30 12:56:51 +0200 (Wed, 30 Sep 2009) $

Field Summary
private  Map<String,String> headers
           
private static long serialVersionUID
           
private  Table table
           
private  int width
           
 
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
Form()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 void setWidth(int width)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, 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

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

table

private Table table

headers

private Map<String,String> headers

width

private int width
Constructor Detail

Form

public Form()
Method Detail

setWidth

public void setWidth(int width)

doStartTag

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

doEndTag

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

2.17.2: 2011-06-17