Class ExtensionCells
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- net.sf.basedb.clients.web.taglib.table.ExtensionCells
-
- All Implemented Interfaces:
Serializable
,BodyTag
,IterationTag
,JspTag
,Tag
public class ExtensionCells extends BodyTagSupport
Tag for generating content from extension columns.Syntax:
<tbl:xt-cells dc=... item=... > <tbl:cell column="xt-columns" /> </tbl:xt-cells>
Tag attributes Attribute Default value Required Description dc - yes A DbControl
that can be used to query the database.item - yes The current item in the table. - Since:
- 3.2
- Author:
- Nicklas
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ListColumnAction
current
private DbControl
dc
private Iterator<ListColumnAction>
extensionColumns
private Object
item
private static long
serialVersionUID
-
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
-
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
-
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
-
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
Constructors Constructor Description ExtensionCells()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doAfterBody()
int
doStartTag()
(package private) Object
getCurrentValue(Cell cell)
Get the value for the current column and item and update other settings for the cell.(package private) String
getNextColumnId()
This is called by the Cell taglib when the next extension column is about to be processed.private void
readObject(ObjectInputStream ois)
void
setDc(DbControl dc)
void
setItem(Object item)
private void
writeObject(ObjectOutputStream ois)
-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
-
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
item
private Object item
-
dc
private DbControl dc
-
extensionColumns
private Iterator<ListColumnAction> extensionColumns
-
current
private ListColumnAction current
-
-
Method Detail
-
setDc
public void setDc(DbControl dc)
-
setItem
public void setItem(Object item)
-
doStartTag
public int doStartTag() throws JspException
- Specified by:
doStartTag
in interfaceTag
- Overrides:
doStartTag
in classBodyTagSupport
- Throws:
JspException
-
doAfterBody
public int doAfterBody() throws JspException
- Specified by:
doAfterBody
in interfaceIterationTag
- Overrides:
doAfterBody
in classBodyTagSupport
- Throws:
JspException
-
readObject
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException
- Throws:
ClassNotFoundException
IOException
-
writeObject
private void writeObject(ObjectOutputStream ois) throws IOException
- Throws:
IOException
-
getNextColumnId
String getNextColumnId()
This is called by the Cell taglib when the next extension column is about to be processed. The method should step to the next column and return the column id.
-
getCurrentValue
Object getCurrentValue(Cell cell)
Get the value for the current column and item and update other settings for the cell. Note that it is important that the current value is retrieved first. This can give the action an opportunity to return different values for the other settings depending on the current item.
-
-