Oracle ADF Faces - af:commandButton
Summary

Tag name: < af:commandButton >

UIComponent class: oracle.adf.view.faces.component.core.nav.CoreCommandButton

Component type: oracle.adf.CoreCommandButton

The commandButton control creates a button representation of a UIXCommand.

Example:

A simple example of a button saying "Enter" that submits an input field.

   <af:form>
     <af:inputText value="Default input text" />
     <af:commandButton text="Enter"/>
   </af:form>

An button which submits the form without doing any validation.

   <af:form>
     <af:inputText value="Default input text"/>
     <af:commandButton text="Unvalidated Submit"
                       immediate="true" />
   </form>

Events

Type Phases Description
javax.faces.event.ActionEvent Invoke Application

Apply Request Values
Event delivered when the "action" of the component has been invoked; for example, by clicking on a button. The action may result in page navigation.
oracle.adf.view.faces.event.ReturnEvent Apply Request Values Event delivered when the dialog has completed successfully.
oracle.adf.view.faces.event.LaunchEvent Invoke Application

Apply Request Values
Event delivered to prompt the command to launch a dialog.

Attributes
Ungrouped attributes
Na me Type Supports EL? Description
accessKey char Yes Character used to gain quick access to this button. For accessibility reasons, this functionality is not supported in screen reader mode.

If the same access key appears in multiple input fields in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys. Note that user agents are inconsistent about dealing with two links having same access key, and so the cycling behavior is dependent on what the user agent provides.

This attribute is sometimes referred to as the "mnemonic".

The character specified by this attribute must exist in the Text attribute of this button instance. If it does not, the user will receive no visual indication of the existence of the accessKey. The easiest, and most convenient way to specify both the text and the mnemonic together is to use textAndAccessKey.

action javax.faces.el.MethodBinding Yes a reference to an action method sent by the command component, or the static outcome of an action
actionListener javax.faces.el.MethodBinding Only EL a method reference to an action listener
attributeChangeListener javax.faces.el.MethodBinding Only EL a method reference to an attribute change listener
blocking boolean Yes If set to TRUE the component will start blocking user input when the action is initiated. The b locking will stop when a response is received from the server.
disabled boolean Yes whether the button should be disabled.
immediate boolean Yes whether or not data validation - client-side or server-side - should take place when events are generated by this component. When immediate is true, the default ActionListener provided by the JavaServer Faces implementation should be executed during Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase.
launchListener javax.faces.el.MethodBinding Only EL a method reference to a launch listener
partialSubmit boolean Yes whether the action should be done through a partial page submit or not. Default is false: no partial page submit.
partialTriggers String[ ] Yes the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too.
returnListener javax.faces.el.MethodBinding Only EL a method reference to an return listener
text String Yes the textual label of the button.
textAndAccessKey String Yes An attribute that will simultaneously set both the "text" and "accessKey" attributes from a single value, using conventional ampersand (' & ') notation.

For exam ple, setting this attribute to "T & amp;ext" will set the text to "Text" and the access key to 'e'.

useWindow boolean Yes whether to use a new window when launching dialogs. This will be consulted any time the command receives a LaunchEvent.
windowHeight int Yes height of the window, if this command is used to launch a window.
windowWidth int Yes width of the window, if this command is used to launch a window.
Core attributes
Name Type Supports EL? Description
binding oracle.adf.view.faces.component. core.nav.CoreCommandButton Only EL a binding reference to store the component instance
id String No the identifier for the component. This must be a valid XML ID, and therefore may not contain whitespace or start with a number. Also, JSF requires that IDs must not contain any colons (":").
inlineStyle String Yes the inline CSS style for this element
rendered boolean Yes whether the bean is rendered. When set to false, no output will be delivered for this bean.
shortDesc String Yes the short description of the bean. This text is commonly used by user agents to display tooltip help text.
styleClass String Yes the CSS style class of the bean.
Javascript attributes
Name Type Supports EL? Description
onclick String Yes an onclick Javascript handler.
ondblclick String Yes an ondblclick Javascript handler.
onkeydown String Yes an onkeydown Javascript handler.
onkeypress String Yes an onkeypress Javascript handler.
onkeyup String Yes an onkeyup Javascript handler.
onmousedown String Yes an onmousedown Javascript handler.
onmousemove String Yes an onmousemove Javascript handler.
onmouseout String Yes an onmouseout Javascript handler.
onmouseover String Yes an onmouseover Javascript handler.
onmouseup String Yes an onmouseup Javascript handler.
Copyright © 2003-2006, Oracle Corporation. All Rights Reserved.

E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy