Defining default action to button in ADF

ADF By Jun 21, 2013 No Comments
There are many cases where user wants to submit a page or
form on press of “Enter”  key.
ADF provides a direct solution to this.
af:form or af:subform has a property called defaultCommand.
If we give button id as its value then on press of enter key, the given
button will be executed.
<af:subform defaultCommand=”cb1″

<af:panelFormLayout id=”pfl1″>   
label=”User Name” id=”it1″ />
label=”Password” id=”it2″ secret=”true”/>

<af:commandButton text=”Login” id=”cb1″  action=”#{pageFlowScope.mbean.doLogin}”


(Visited 1 times, 1 visits today)

No Comments

Leave a comment