Databases Reference
In-Depth Information
Time for action - adding a Commit button to the UI page
Now we will see how we can expose the built-in Commit operaion to the UI using the data
control layer:
1.
In the Data controls palete, as shown in the following screenshot, navigate to
EmpDirectoryModuleDataControl :
2. Under the EmpDirectoryModuleDataControl opion, expand the Operaions secion
and select the Commit operaion as shown in the preceding screenshot.
3. Drag this operaion to the index.jspx page in the Source view and place it just
ater the </af:table> tag.
4. Select the ADF Buton opion from the menu displayed. This acion will create a
Commit buton to save the changes to the database.
5. The page deiniion for the index.jspx file is accessed by clicking on the Bindings
secion for the page.
What just happened?
In the previous acion exercise, we created a Commit operaion to save the changes made
in the UI layer to the database layer. When we select the ADF Buton opion from the menu,
a command buton is created in the page with the actionListener property mapped to
the #{bindings.Commit.execute} method. Acion binding is used to bind the method
exposed from the application module or the view object collecion. The Commit
operaion is exposed in the application module as shown in the following code:
<af:commandButton actionListener="#{bindings.Commit.execute}"
text="Commit" disabled="#{!bindings.Commit.enabled}" id="cb1"/>
 
Search WWH ::




Custom Search