|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
biz.c24.io.api.web.StructureTag
public class StructureTag
A tag library for displaying the structure of a complex data object and allowing the user to add / remove fields and
edit the data contained in it.
The tag library descriptor should contain the following entry:
<tag> <name>tag name</name> <tagclass>biz.c24.customtags.SwiftStructureTag</tagclass> <bodycontent>JSP</bodycontent> <attribute> <name>object</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>editable</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>addImage</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>removeImage</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>inputNamePrefix</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>jspName</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag>
Field Summary |
---|
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 | |
---|---|
StructureTag()
|
Method Summary | |
---|---|
int |
doStartTag()
|
protected void |
generate(ComplexDataObject obj,
DataComponent c,
ValidationEvent[] errors,
boolean visible,
int thisDepth)
|
protected void |
generate(ComplexDataObject obj,
ValidationEvent[] errors,
boolean visible)
|
protected void |
generateAddRemoveButtons(ComplexDataObject obj,
DataComponent c,
ValidationEvent[] errors,
Object value,
int index,
int thisDepth,
boolean visible,
boolean parserError)
|
protected void |
generateName(ComplexDataObject obj,
DataComponent c,
ValidationEvent[] errors,
Object value,
int index,
int thisDepth,
boolean visible,
boolean parserError)
|
protected void |
generateRow(ComplexDataObject obj,
DataComponent c,
ValidationEvent[] errors,
Object value,
int index,
boolean visible,
boolean parserError,
int thisDepth)
|
protected void |
generateValue(ComplexDataObject obj,
DataComponent c,
ValidationEvent[] errors,
Object value,
int index,
int thisDepth,
boolean viewable,
boolean parserError)
|
protected void |
generateValueCustom(DataComponent c,
String value,
String xpath,
boolean valid)
|
String |
getAddImage()
Returns the path to the image used on the add buttons. |
String |
getEditable()
Gets whether this tag allows editing. |
String |
getInputNamePrefix()
Returns the prefix to be used on the names of the input fields. |
String |
getJspName()
Returns the name of the calling JSP. |
ComplexDataObject |
getObject()
Returns the object. |
String |
getRemoveImage()
Returns the path to the image used on the remove buttons. |
protected boolean |
isGenerateValueCustom(DataComponent c)
|
void |
setAddImage(String addImage)
Sets the path to the image used on the add buttons. |
void |
setEditable(String editable)
Sets whether this tag allows editing. |
void |
setInputNamePrefix(String inputNamePrefix)
Sets the prefix to be used on the names of the input fields. |
void |
setJspName(String jspName)
Sets the name of the calling JSP. |
void |
setObject(ComplexDataObject object)
Sets the object. |
void |
setRemoveImage(String removeImage)
Sets the path to the image used on the remove buttons. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
doAfterBody, doEndTag, 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 |
Constructor Detail |
---|
public StructureTag()
Method Detail |
---|
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
protected void generate(ComplexDataObject obj, ValidationEvent[] errors, boolean visible) throws IOException
IOException
protected void generate(ComplexDataObject obj, DataComponent c, ValidationEvent[] errors, boolean visible, int thisDepth) throws IOException
IOException
protected void generateRow(ComplexDataObject obj, DataComponent c, ValidationEvent[] errors, Object value, int index, boolean visible, boolean parserError, int thisDepth) throws IOException
IOException
protected void generateAddRemoveButtons(ComplexDataObject obj, DataComponent c, ValidationEvent[] errors, Object value, int index, int thisDepth, boolean visible, boolean parserError) throws IOException
IOException
protected void generateName(ComplexDataObject obj, DataComponent c, ValidationEvent[] errors, Object value, int index, int thisDepth, boolean visible, boolean parserError) throws IOException
IOException
protected void generateValue(ComplexDataObject obj, DataComponent c, ValidationEvent[] errors, Object value, int index, int thisDepth, boolean viewable, boolean parserError) throws IOException
IOException
protected boolean isGenerateValueCustom(DataComponent c)
protected void generateValueCustom(DataComponent c, String value, String xpath, boolean valid) throws IOException
IOException
public ComplexDataObject getObject()
public void setObject(ComplexDataObject object)
object
- The object.public String getEditable()
public void setEditable(String editable)
editable
- Whether this tab should allow editing.public String getAddImage()
public void setAddImage(String addImage)
addImage
- The path.public String getRemoveImage()
public void setRemoveImage(String removeImage)
removeImage
- The path.public String getInputNamePrefix()
public void setInputNamePrefix(String inputNamePrefix)
inputNamePrefix
- The prefix.public String getJspName()
public void setJspName(String jspName)
jspName
- The jsp name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |