|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.jsp.tagext.TagSupport javax.servlet.jsp.tagext.BodyTagSupport com.bea.wlw.netui.tags.AbstractBaseTag com.bea.wlw.netui.tags.DataSourceTag com.bea.wlw.netui.tags.DefaultableDataSourceTag com.bea.wlw.netui.tags.html.TextBox
public class TextBox
Renders a databound TextBox with the given attributes.
Attribute Descriptions | |||
---|---|---|---|
Attribute | Required | Runtime Expression Evaluation | Data Bindable |
accessKey | No | No | No |
Define the keyboard navigation key for the element. | |||
alt | No | No | Read Only |
Define the alt attribute of the <Input> element. | |||
dataSource | Yes | No | Read / Write |
The name of a form bean property or an expression that contains the TextBox state. | |||
defaultValue | No | No | Read Only |
A literal value or an expression that is used to set the TextBox's initial state. The default value is applied only if the dataSource returns null. | |||
disabled | No | No | Read Only |
A boolean value which if true will cause the textBox to be disabled. | |||
maxLength | No | No | Read Only |
The maximum number of characters in the TextBox. | |||
password | No | No | No |
A boolean specifying whether the password characters that the user enters into the textBox will be disguised in the browser. | |||
readOnly | No | No | No |
A boolean specifying whether the TextBox is read-only. | |||
size | No | No | Read Only |
The visible number of characters in the TextBox. | |||
tagId | No | No | No |
The ID of this textbox used by the enclosing html tag to get the tag's name, for JavaScript and focus purposes. |
<netui:textBox dataSource="{actionForm.firstName}" defaultValue="{pageFlow.defaultFirstName}" size="20" />
[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/textBox/
Field Summary |
---|
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag |
---|
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT |
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 com.bea.wlw.netui.tags.html.HtmlConstants |
---|
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH |
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 | |
---|---|
TextBox()
|
Method Summary | |
---|---|
void |
addFormatter(FormatTag.Formatter formatter)
Adds a FormatTag.Formatter to the TextBox's set of formatters |
int |
doEndTag()
Render the TextBox. |
int |
doStartTag()
Prepare the TextBox's formatters. |
protected Object |
evaluateDefaultValue()
|
protected String |
formatText(Object text)
|
String |
getAccessKey()
Gets the accessKey attribute value. |
String |
getAlt()
Gets the alt attribute on the generate <input tag. |
String |
getDisabled()
Gets if this TextBox is disabled or not. |
String |
getMaxlength()
Gets the maximum length (in characters) of the TextBox. |
String |
getOnBlur()
Gets the onBlur javascript event. |
String |
getOnChange()
Gets the onChange javascript event. |
String |
getOnClick()
Gets the onClick javascript event. |
String |
getOnDblClick()
Gets the onDblClick javascript event. |
String |
getOnFocus()
Gets the onFocus javascript event. |
String |
getOnKeyDown()
Gets the onKeyDown javascript event. |
String |
getOnKeyPress()
Gets the onKeyPress javascript event. |
String |
getOnKeyUp()
Gets the onKeyUp javascript event. |
String |
getOnMouseDown()
Gets the onMouseDown javascript event. |
String |
getOnMouseMove()
Gets the onMouseMove javascript event. |
String |
getOnMouseOut()
Gets the onMouseOut javascript event. |
String |
getOnMouseOver()
Gets the onMouseOver javascript event. |
String |
getOnMouseUp()
Gets the onMouseUp javascript event. |
String |
getOnSelect()
Gets the onSelect javascript event. |
boolean |
getPassword()
Gets the password state (true means this is a password field). |
boolean |
getReadonly()
Gets if this TextBox is read-only. |
String |
getSize()
Gets the size (in characters) of the TextBox. |
String |
getStyle()
Gets the style of the rendered html tag. |
String |
getStyleClass()
Gets the style class of the rendered html tag. |
String |
getTabindex()
Gets the tabIndex of the rendered html tag. |
String |
getTagId()
Return the ID of the textbox. |
String |
getTagName()
Return the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
void |
setAccessKey(String accessKey)
Sets the accessKey attribute value. |
void |
setAlt(String alt)
Sets the alt attribute value. |
void |
setAttribute(String name,
String value)
Set an attribute value. |
void |
setDisabled(String disabled)
Set if this TexBox is disabled or not. |
void |
setMaxlength(String maxlength)
Set the maximum length (in characters) of the TextBox. |
void |
setOnBlur(String onblur)
Sets the onBlur javascript event. |
void |
setOnChange(String onchange)
Sets the onChange javascript event. |
void |
setOnClick(String onclick)
Sets the onClick javascript event. |
void |
setOnDblClick(String ondblclick)
Sets the onDblClick javascript event. |
void |
setOnFocus(String onfocus)
Sets the onFocus javascript event. |
void |
setOnKeyDown(String onkeydown)
Sets the onKeyDown javascript event. |
void |
setOnKeyPress(String onkeypress)
Sets the onKeyPress javascript event. |
void |
setOnKeyUp(String onkeyup)
Sets the onKeyUp javascript event. |
void |
setOnMouseDown(String onmousedown)
Sets the onMouseDown javascript event. |
void |
setOnMouseMove(String onmousemove)
Sets the onMouseMove javascript event. |
void |
setOnMouseOut(String onmouseout)
Sets the onMouseOut javascript event. |
void |
setOnMouseOver(String onmouseover)
Sets the onMouseOver javascript event. |
void |
setOnMouseUp(String onmouseup)
Sets the onMouseUp javascript event. |
void |
setOnSelect(String onselect)
Sets the onSelect javascript event. |
void |
setPassword(boolean password)
Set the password state (true means this is a password field). |
void |
setReadonly(boolean readonly)
Set if this TextBox is read-only. |
void |
setSize(String size)
Set the size (in characters) of the TextBox. |
void |
setStyle(String style)
Sets the style of the rendered html tag. |
void |
setStyleClass(String styleClass)
Sets the style class of the rendered html tag. |
void |
setTabindex(String tabindex)
Sets the tabIndex of the rendered html tag. |
void |
setTagId(String tagId)
Set the ID of the textbox. |
Methods inherited from class com.bea.wlw.netui.tags.DefaultableDataSourceTag |
---|
getDefaultValue, setDefaultValue |
Methods inherited from class com.bea.wlw.netui.tags.DataSourceTag |
---|
addNamingInterceptor, doNaming, evaluateDataSource, getDataSource, qualifyAttribute, removeNamingInterceptor, setDataSource |
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport |
---|
doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
---|
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, 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, setParent |
Constructor Detail |
---|
public TextBox()
Method Detail |
---|
public String getTagName()
getTagName
in class AbstractBaseTag
public void setAttribute(String name, String value) throws javax.servlet.jsp.JspException
name
represents
the name of the attribute.
The value
represents the value and may contain
a netui expression. This method may result in errors being generated.
This requires that the tag buffer its body and
write attributes in the end tag. For the textarea tag it is not legal to set
the id
or name
attributes with this method.
setAttribute
in interface IAttributeConsumer
name
- The name of the attribute. This value may not be null or the empty string.value
- The value of the attribute. This may contain a netui expression.
javax.servlet.jsp.JspException
- A JspException may be thrown if there is an error setting the attribute.protected Object evaluateDefaultValue()
evaluateDefaultValue
in class DefaultableDataSourceTag
public String getMaxlength()
public void setMaxlength(String maxlength)
maxlength
- - the max lengthpublic boolean getPassword()
public void setPassword(boolean password)
password
- - the password statepublic String getDisabled()
public void setDisabled(String disabled)
disabled
- - true or falsepublic boolean getReadonly()
public void setReadonly(boolean readonly)
readonly
- - the read-only statepublic String getSize()
public void setSize(String size)
size
- - the sizepublic String getTagId()
public void setTagId(String tagId)
tagId
- - the ID.String value. Sets the id
(or name
) attribute of the rendered HTML tag.
Note that the real id attribute rendered in the browser may be
changed by the application container (for example, Portal containers may change
the rendered id value to ensure the uniqueness of
id's on the page). In this case, the real id rendered
in the browser may be looked up
through the JavaScript function getNetuiTagName( tagId, tag ).
For example, assume that some tag's tagId
attribute is set to foo
.
<netui:textBox tagId="foo" />
Then the following JavaScript function will return the real id attribute rendered in the browser:
getNetuiTagName( "foo", this )
To get a <netui:form> element and all of its children elements in JavaScript, use
the same JavaScript function getNetuiTagName( tagId, tag )
. For example,
assume that there is a <netui:form> whose
tagId attribute is set to bar
.
<netui:form tagId="bar" >
Then the following JavaScript function will return the <netui:form> element and its children (packaged as an array).
document[getNetuiTagName( "bar", this )]
To retreive the value entered into a <netui:textBox> within the <netui:form> tag, use the following JavaScript expression.
document[getNetuiTagName("bar", this)][getNetuiTagName("foo", this)].value
The second parameter ensures that the JavaScript function
begins its search within the correct Portlet scope. Pass the
JavaScript keyword this
as the second parameter.
For detailed information on using the function
getNetuiTagName( tagId, tag )
see
Using JavaScript in Page Flow and Portal Applications.
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredpublic int doEndTag() throws javax.servlet.jsp.JspException
doEndTag
in interface javax.servlet.jsp.tagext.Tag
doEndTag
in class javax.servlet.jsp.tagext.BodyTagSupport
javax.servlet.jsp.JspException
- if a JSP exception has occurredprotected void localRelease()
localRelease
in class DefaultableDataSourceTag
public void addFormatter(FormatTag.Formatter formatter)
addFormatter
in interface Formattable
formatter
- - a FormatTag.Formatter added by a child FormatTag.protected String formatText(Object text)
public void setTabindex(String tabindex)
tabindex
- - the tab index.public String getTabindex()
public void setStyle(String style)
style
- - the html style.public String getStyle()
public void setStyleClass(String styleClass)
styleClass
- - the html style class.public String getStyleClass()
public String getAccessKey()
public void setAccessKey(String accessKey)
A, C, E, F, G,
H, V, left arrow, and right arrow
.
accessKey
- - the accessKey value.A, C, E, F, G,
H, V, left arrow, and right arrow
public String getAlt()
public void setAlt(String alt)
alt
- - the alt value.public String getOnClick()
public void setOnClick(String onclick)
onclick
- - the onClick event.public String getOnDblClick()
public void setOnDblClick(String ondblclick)
ondblclick
- - the onDblClick event.public String getOnKeyDown()
public void setOnKeyDown(String onkeydown)
onkeydown
- - the onKeyDown event.public String getOnKeyPress()
public void setOnKeyPress(String onkeypress)
onkeypress
- - the onKeyPress event.public String getOnKeyUp()
public void setOnKeyUp(String onkeyup)
onkeyup
- - the onKeyUp event.public String getOnMouseDown()
public void setOnMouseDown(String onmousedown)
onmousedown
- - the onMouseDown event.public String getOnMouseMove()
public void setOnMouseMove(String onmousemove)
onmousemove
- - the onMouseMove event.public String getOnMouseOut()
public void setOnMouseOut(String onmouseout)
onmouseout
- - the onMouseOut event.public String getOnMouseOver()
public void setOnMouseOver(String onmouseover)
onmouseover
- - the onMouseOver event.public String getOnMouseUp()
public void setOnMouseUp(String onmouseup)
onmouseup
- - the onMouseUp event.public String getOnBlur()
public void setOnBlur(String onblur)
onblur
- - the onBlur event.public String getOnFocus()
public void setOnFocus(String onfocus)
onfocus
- - the onFocus event.public String getOnChange()
public void setOnChange(String onchange)
onchange
- - the onChange event.public String getOnSelect()
public void setOnSelect(String onselect)
onselect
- - the onSelect event.
|
BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |