public class ButtonTag extends javax.servlet.jsp.tagext.TagSupport implements ActionInvokingTagIF
Modifier and Type | Field and Description |
---|---|
protected String |
action_name |
protected String |
button_text |
protected String |
id |
protected String |
image_name |
protected String |
klass |
protected String |
params |
protected String |
readonly |
protected String |
reset_button |
protected List |
sub_actions |
protected static String |
TEMPLATE_FILE
The location where the velocity template can be retrieved from.
|
Constructor and Description |
---|
ButtonTag() |
Modifier and Type | Method and Description |
---|---|
void |
addAction(ActionData action)
Accepts the action and adds it to the list of actions to be
invoked together with the primary action.
|
int |
doEndTag()
Generate the button.
|
int |
doStartTag()
Process the start tag, do nothing.
|
void |
release()
Release any acquired resources.
|
void |
setAction(String action_name)
Sets the name of the related action (required).
|
void |
setClass(String klass)
Sets the class attribute of the tag.
|
void |
setId(String id)
Sets the id of the tag.
|
void |
setImage(String image_name)
Sets the name of the image that should be displayed as graphical
representation of this button.
|
void |
setParams(String params)
Sets the variable name(s) of the parameter(s) transmitted to the
action separated by whitespaces (optional).
|
void |
setReadonly(String readonly)
Sets the the readonly flag of the tag.
|
void |
setReset(String reset_button)
Sets the button behaviour to reset (allowed values are
"yes" and "no").
|
void |
setText(String button_text)
Sets the text that should be displayed inside the button.
|
protected static final String TEMPLATE_FILE
protected String id
protected String readonly
protected String klass
protected String action_name
protected String params
protected String image_name
protected String button_text
protected String reset_button
protected List sub_actions
public int doStartTag()
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
EVAL_BODY_INCLUDE
public int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
public void addAction(ActionData action)
ActionInvokingTagIF
addAction
in interface ActionInvokingTagIF
public void setId(String id)
setId
in class javax.servlet.jsp.tagext.TagSupport
public void setReadonly(String readonly)
public void setClass(String klass)
public void setAction(String action_name)
public void setParams(String params)
public void setText(String button_text)
Note: 'image' OR 'text' property has to be specified.
public void setImage(String image_name)
Note: 'image' OR 'text' property has to be specified.
public void setReset(String reset_button)
Note: If 'reset' is not set, "submit" will be the default behaviour.