Common Tag Attributes

 < Day Day Up > 



As mentioned earlier, many of the tags in this library have several attributes in common. They are described in the following table.

Attribute

Description

Accepts Scriptlet

Required

accesskey

Same as the corresponding HTML tag’s attribute with the same name.Specifies the keyboard key that causes this control to immediately receive focus when the key is pressed.

Yes

No

alt

Same as the corresponding HTML tag’s attribute with the same name.Specifies the alternate text for this control.

Yes

No

altKey

Specifies a key from Struts’ ApplicationResources.properties file whose value will be used to set the corresponding HTML tag’s alt attribute.

Yes

No

disabled

Same as the corresponding HTML tag’s attribute with the same name.Accepts “true” to denote that the control will be disabled, preventing its use.

Yes

No

onblur

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control loses input focus.

Yes

No

onchange

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control loses input focus and its value has changed.

Yes

No

onclick

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control receives a mouse click.

Yes

No

ondblclick

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control receives a mouse double-click.

Yes

No

onfocus

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control receives input focus.

Yes

No

onkeydown

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control has focus and a key is pressed.

Yes

No

onkeypress

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control has focus and a key is pressed and released.

Yes

No

onkeyup

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control has focus and a key is released.

Yes

No

onmousedown

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control is under the mouse pointer and a mouse button is pressed.

Yes

No

onmousemove

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control is under the mouse pointer and the mouse is moved.

Yes

No

onmouseout

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control is under the mouse pointer and is then moved away from the control.

Yes

No

onmouseover

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control is not under the mouse pointer and is then moved to the control.

Yes

No

onmouseup

Same as the corresponding HTML tag’s attribute with the same name.Specifies the JavaScript code to execute when this control is under the mouse pointer and a mouse button is released.

Yes

No

style

Same as the corresponding HTML tag’s attribute with the same name.Specifies the CSS style to apply to this control.

Yes

No

styleClass

Same as the corresponding HTML tag’s class attribute.Specifies the CSS class to apply to this control.

Yes

No

styleId

Same as the corresponding HTML tag’s id attribute.Specifies the CSS id to apply to this control.

Yes

No

tabindex

Same as the corresponding HTML tag’s attribute with the same name.Specifies the tab order for this control.

Yes

No

title

Same as the corresponding HTML tag’s attribute with the same name.Specifies the title for this control.

Yes

No

titleKey

Specifies a key from Struts’ ApplicationResources.properties file whose value will be used to set the corresponding HTML tag’s title attribute.

Yes

No



 < Day Day Up > 



Struts. The Complete Reference
Struts: The Complete Reference, 2nd Edition
ISBN: 0072263865
EAN: 2147483647
Year: 2003
Pages: 134
Authors: James Holmes

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net