com.ashridgetech.gen2j.web
Class ObjectTag
java.lang.Object
|
+--javax.servlet.jsp.tagext.TagSupport
|
+--javax.servlet.jsp.tagext.BodyTagSupport
|
+--com.ashridgetech.gen2j.web.ObjectTag
- All Implemented Interfaces:
- javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, Serializable, javax.servlet.jsp.tagext.Tag
- public class ObjectTag
- extends javax.servlet.jsp.tagext.BodyTagSupport
Custom tag that handles the display of an object, which
may be a property of a containing object.
- Version:
- 1.0
- Author:
- Paul Boocock
- See Also:
- Serialized Form
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 |
Method Summary |
int |
doAfterBody()
If processing a collection and there are more elements,
make the next collection element available and loop, otherwise
end this tag's processing. |
int |
doEndTag()
Leave the property which has just been processed. |
int |
doStartTag()
Prepare the JspManager for the processing of the property. |
String |
getProperty()
Get the name of the property of the containing object which this object represents. |
String |
getViewName()
Get the name of the view required for the object displayed
by this tag. |
void |
release()
Release any acquired resources. |
void |
setProperty(String property)
Set the name of the property of the containing object which this object represents. |
void |
setViewName(String viewName)
Set the name of the view required for the object displayed
by this tag. |
String |
toString()
|
static String |
translateReturnValue(int returnValue)
Get a string representation of a Tag method return value. |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from interface javax.servlet.jsp.tagext.Tag |
getParent, setPageContext, setParent |
ObjectTag
public ObjectTag()
getProperty
public String getProperty()
- Get the name of the property of the containing object which this object represents.
If this is null, the containing object itself is displayed.
setProperty
public void setProperty(String property)
- Set the name of the property of the containing object which this object represents.
- See Also:
getProperty()
getViewName
public String getViewName()
- Get the name of the view required for the object displayed
by this tag.
- Returns:
- value of viewName.
setViewName
public void setViewName(String viewName)
- Set the name of the view required for the object displayed
by this tag.
- Parameters:
viewName
- the view name.
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Prepare the
JspManager
for the processing of the property.
if no property is specified, display the current object of the JSP.
If the tag has no body, include the appropriate JSP.
- Overrides:
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- if a JSP exception has occurred
doAfterBody
public int doAfterBody()
throws javax.servlet.jsp.JspException
- If processing a collection and there are more elements,
make the next collection element available and loop, otherwise
end this tag's processing.
- Overrides:
doAfterBody
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- if a JSP exception has occurred
doEndTag
public int doEndTag()
throws javax.servlet.jsp.JspException
- Leave the property which has just been processed.
- Overrides:
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
- if a JSP exception has occurred
release
public void release()
- Release any acquired resources.
- Overrides:
release
in class javax.servlet.jsp.tagext.BodyTagSupport
toString
public String toString()
- Overrides:
toString
in class Object
translateReturnValue
public static String translateReturnValue(int returnValue)
- Get a string representation of a Tag method return value.
- Parameters:
returnValue
- a Tag method return value- Returns:
- the name of the value
Copyright © 2002 Ashridge Technologies Ltd. All Rights Reserved.