|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectTagSupport
BodyTagSupport
AbstractClassicTag
HtmlBaseTag
HtmlFocusBaseTag
Button
public class Button
Generates a button on the page with the specified attributes. The <netui:button> tag must be enclosed in <netui:form...> ... </netui:form> tags. You can specify the action that the form will raise on the <netui:form> tag.
processData
action method (specified on the <netui:form>'s action
attribute).
<netui:form action="processData"> <!-- input elements here --> <netui:button value="Submit" type="submit"/> </netui:form>
Field Summary | |
---|---|
static String |
ACTION_OVERRIDE
|
Fields inherited from class AbstractClassicTag |
---|
DefaultNamingChain, EMPTY_STRING, NETUI_UNIQUE_CNT |
Fields inherited from class BodyTagSupport |
---|
bodyContent |
Fields inherited from class TagSupport |
---|
id, pageContext |
Fields inherited from interface BodyTag |
---|
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
---|
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
---|---|
Button()
|
Method Summary | |
---|---|
void |
addParameter(String name,
Object value,
String facet)
Adds a URL parameter to the generated hyperlink. |
int |
doAfterBody()
Save the associated button label from the body content (if any). |
int |
doEndTag()
Render the button. |
int |
doStartTag()
Process the start of the Button. |
PopupSupport |
getPopupSupport()
Get a helper to provide popup support. |
protected AbstractHtmlState |
getState()
This method will return the state associated with the tag. |
String |
getTagName()
Return the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
void |
setAccessKey(char accessKey)
Sets the accessKey attribute value. |
void |
setAction(String action)
Set the name of the action for the Button. |
void |
setAlt(String alt)
Sets the alt attribute value. |
void |
setAttribute(String name,
String value,
String facet)
Base support for the attribute tag. |
void |
setDisableSecondClick(boolean disableSecondClick)
When true, this button will disable itself before submitting. |
void |
setPopup(boolean popup)
Sets the popup indicator. |
void |
setRenderAsButton(boolean renderAsButton)
When set to true, this tag will render the <button> control in the HTML markup, rather than the <input type=" |
void |
setTabindex(int tabindex)
Sets the tabIndex of the rendered html tag. |
void |
setTargetScope(String targetScope)
Set the target "scope" for the button's action. |
void |
setType(String type)
Set the type of the Button (submit, button, or reset). |
void |
setValue(String value)
Set the value of the Button's text. |
Methods inherited from class HtmlFocusBaseTag |
---|
isDisabled, setDisabled, setOnBlur, setOnChange, setOnFocus, setOnSelect |
Methods inherited from class HtmlBaseTag |
---|
getJavaScriptAttribute, getOnClick, getTagId, renderDefaultNameAndId, renderNameAndId, setDir, setLang, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStateAttribute, setStyle, setStyleClass, setTagId, setTitle |
Methods inherited from class BodyTagSupport |
---|
doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface IHtmlCore |
---|
setStyle, setStyleClass, setTagId, setTitle |
Methods inherited from interface Tag |
---|
getParent, setPageContext, setParent |
Field Detail |
---|
public static final String ACTION_OVERRIDE
Constructor Detail |
---|
public Button()
Method Detail |
---|
public String getTagName()
getTagName
in interface INetuiTag
getTagName
in class AbstractClassicTag
protected AbstractHtmlState getState()
getState
in class HtmlBaseTag
AbstractHtmlState
class.public void setAttribute(String name, String value, String facet) throws JspException
type
and value
attributes.
setAttribute
in interface IAttributeConsumer
setAttribute
in class HtmlBaseTag
name
- The name of the attribute. This value may not be null or the empty string.value
- The value of the attribute.facet
- The name of a facet to which the attribute will be applied. This is optional.
JspException
- A JspException may be thrown if there is an error setting the attribute.public void setAction(String action) throws JspException
action
- the name of the action to set for the Button.
JspException
public void setTargetScope(String targetScope)
targetScope
- the name of the target scope in which the associated action's page flow resides.public void setType(String type) throws JspException
type
- the type of the Button.
JspException
public void setValue(String value) throws JspException
value
- the value of the Button's text.
JspException
public void setPopup(boolean popup)
popup
- whether or not the button should open a popup window.public void setDisableSecondClick(boolean disableSecondClick)
disableSecondClick
- when true, this button will disable itself before submitting.public void setRenderAsButton(boolean renderAsButton)
Please note that using an action override and rendering the markup with a <button> control will not work in Internet Explorer. Internet Explorer includes the name and value of every <button> control in the HTML form as parameters in the request query, regardless of whether the button has been clicked or not.
renderAsButton
- whether or not to render a <button> rather than an <input> tag.public void addParameter(String name, Object value, String facet) throws JspException
addParameter
in interface IUrlParams
name
- the name of the parameter to be added.value
- the value of the parameter to be added (a String or String[]).facet
-
JspException
public int doStartTag() throws JspException
doStartTag
in interface Tag
doStartTag
in class BodyTagSupport
JspException
- if a JSP exception has occurredpublic int doAfterBody() throws JspException
However, if the renderAsButton
attribute
is set to true, then we render the HTML markup with an HTML
<button> tag, using the value attribute, and placing the
evaluated body content as the content between the begin and
end HTML button tags.
doAfterBody
in interface IterationTag
doAfterBody
in class BodyTagSupport
JspException
- if a JSP exception has occurredpublic int doEndTag() throws JspException
doEndTag
in interface Tag
doEndTag
in class BodyTagSupport
JspException
- if a JSP exception has occurredprotected void localRelease()
localRelease
in class HtmlFocusBaseTag
public void setAccessKey(char accessKey)
A, C, E, F, G,
H, V, left arrow, and right arrow
.
setAccessKey
in interface IHtmlAccessable
accessKey
- the accessKey value.public void setAlt(String alt)
setAlt
in interface IHtmlAccessable
alt
- the alt value.public void setTabindex(int tabindex)
tabindex
- the tab index.public PopupSupport getPopupSupport()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |