This blog we will see how to set the default action in ADF page.
In real time example sometimes we need to submit the form on click of enter key in key board.
Need to add defaultCommand="cb1" for submitting the default action. The code should look like the below
Now run your application, it will call the default button.
You Can download the code: Download
In real time example sometimes we need to submit the form on click of enter key in key board.
Need to add defaultCommand="cb1" for submitting the default action. The code should look like the below
<af:subform
id="s1" defaultCommand="cb1">
<af:inputText
label="Name:" id="it1"/>
<af:commandButton
text="Submit" id="cb1"
actionListener="#{backingBeanScope.backing_DefaultAction.submitAction}"/>
<af:commandButton
text="Reset" id="cb2"
actionListener="#{backingBeanScope.backing_DefaultAction.resetAction}"/>
</af:subform>
|
Now run your application, it will call the default button.
You Can download the code: Download
No comments:
Post a Comment