1) Create an View Object with Name EmpViewObj with following query(Same has
been created in lesson 2) :-
SELECT first_name,last_name,email,phone_number,salary FROM
employees
And add the above created View object to the Application module.
7) Select the EmpViewObj from the data control and drop it on the panelPage. And
from the popped up menu select FormADF Read only form.
Edit From field window will popup. Click ok on this window.
8) Now right click inside the EmpDetails.jspx page and select go to page definition
option.
9) In the Structure pane, right-click the bindings node, and select Insert inside
bindings >action.
10) An action Binding Editor is invoked. Expand the AppModuleDataControl and
select EmpViewObj node.
11) In the Select an Action drop-down list, scroll down and select
setCurrentRowWithKey. In the Parameters area, set the Value property to
#{requestScope.requestRowKey}. This is the EL expression to reference an
attribute named requestRowKey on the request scope that we will set in the
calling page EmpList.jspx. And click Ok.
Now that you have a binding for the current row, add an executable to
invoke the action binding you just created. This executable will set the current
row key automatically as part of the page rendering.
12) In the Structure pane, expand the executables node, then right-click the
EmpViewObj Iterator node, and select Insert before EmpViewObj Iterator >
invokeAction.
13) In the Insert invokeAction dialog, set the ID to setRequestToView and Binds to
the setCurrentRowWithKey action binding you just created.
14) In the Advanced Properties tab, set the Refresh property to prepareModel and the
RefreshCondition to #{adfFacesContext.postback == false}. The Refresh property
controls when the invokeAction executes during the processing of the page. The
prepareModel setting indicates that you want it to be invoked during the "prepare
model" phase when ADF is preparing the data to display.
15) In the application navigator, double-click the EmpList page to view it in the
visual editor. Right-click the view button, and from the context menu select Insert
inside CommandButton > ADF Faces Core > SetActionListener.
17) Now run the EmpList page. And select the particular employee and click on the
View Employee Details button to see details about employee in the EmpDetails
page.