Tag name: <amc:commandButton>
The commandButton component creates a button that, when pressed, will generate an action event. The button can contain text, an image, or both text and an image.
A commandButton component running on Windows Mobile with text attribute set to "Submit".
A button that says "Enter".
<amc:form> <amc:inputText value="Default input text" /> <amc:commandButton text="Enter"/> </amc:form>
Name | Type | Supports EL? | Description |
---|---|---|---|
action | String | Yes | Defines a reference to an action method sent by the command component, or the static outcome of an action. |
actionListener | oracle.adfnmc.el.MethodExpression | Only EL | Defines a method reference to an action listener. |
align | String | Yes |
Specifies the horizontal alignment of an element with respect to the surrounding context. Valid values:
Note: On BlackBerry smartphones, if the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered. |
backgroundColor | String | Yes | Sets the color of a background to an RGB value (rgb(255,0,0)) or a hexadecimal number (#ff0000 or #f00). The default value is device-dependent. |
disabled | boolean | Yes | Specifies whether or not the component is disabled. Unlike a read-only component, a disabled component cannot receive focus. |
focusable | boolean | Yes | Specifies whether or not this component can acquire focus set to it by the user. Unlike disabled, clicking on a focusable component will cause the component to receive focus. |
fontFamily | String | Yes |
Defines a prioritized list of font family names and/or generic family names for an element. The client will use the first value it recognizes. Valid values:
|
fontSize | int | Yes | Specifies the size of a font in points. |
fontStyle | String | Yes |
Specifies how the characters in text should be displayed. Valid values:
fontStyle="bold underline". |
foregroundColor | String | Yes | Specifies the color of the foreground of an element. The color value can be an RGB value (rgb(255,0,0)) or a hexadecimal number (#ff0000 or #f00). The default value is device-dependent. |
height | int | Yes | Specifies the height of the component. Can be entered in pixels or as a percentage of its parent's height. A percentage value should be entered as a number followed by the "%" symbol. A number will be interpreted as a pixel value (as will a number followed by the text "px"). |
icon | String | Yes | Defines the location of an image resource to use as an icon displayed on the button. The image file must be included in the MobileClient project, and specified by its relative location in the project. This attribute can be specified as static text, EL Expression, or combination of both. |
iconPosition | String | Yes |
Specifies the position of the icon. Valid values:
|
id | String | No |
Specifies the identifier for the component. The identifier must follow the following rules:
|
justification | String | Yes |
Specifies the horizontal alignment of the component's text. Valid values:
|
rendered | boolean | Yes | Specifies whether or not the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible). |
text | String | Yes | Specifies the textual label of the component. |
verticalAlign | String | Yes |
Specifies the vertical alignment of a component with respect to the surrounding context. Valid values:
Note: On BlackBerry smartphones, if the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered. |
verticalJustification | String | Yes |
Specifies the vertical alignment of a component's text. Valid values:
|
width | int | Yes | Specifies the width of this component. Can be entered in pixels or as a percentage of its parent's width. A percentage value should be entered as a number followed by the "%" symbol. A number will be interpreted as a pixel value (as will a number followed by the text "px"). |