You are on page 1of 10

JDE Summit 2012 Labs

2. In the Project Properties window, select Dependencies on the left. Then add a new
entry by clicking on the Edit icon above the Dependent Project and Archives
screen.

3. In the Edit Dependencies window, select the Build Output check box and then click
the OK button.

4. Back in the Project Properties window, confirm the new line for Model.jpr and then
click the OK button to close the window.

For Oracle employees and authorized partners only. Do not distribute to third parties. 31
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

5. Back in the Application Navigator, with the Model project highlighted again, right
click and select Rebuild Model.jpr

6. Next, create the bean. In the Application Navigator, select and double-click to open
the file faces-config.xml under View → Web Content → WEB-INF folder.

For Oracle employees and authorized partners only. Do not distribute to third parties. 32
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

7. In the editor pane, switch to the Overview tab (on the bottom of pane), and then click
the green plus icon in the upper right corner to add a managed bean.

8. In the Create Managed Bean window, enter the following values into each of the
fields and click the OK button.

Field Value
Bean Name addressBookQuery
Class Name AddressBookQuery
Package view
Extends java.lang.Object
Scope session

For Oracle employees and authorized partners only. Do not distribute to third parties. 33
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

9. Open the new file AddressBookQuery.java from the folder View → Application
Sources → View

10. The initial code for the bean will be very empty. Assuming the same names and
URLs have been used as defined in the exercise, paste in code pre-typed code from a
file on the desktop. Open the file AddressBookQuery.java from the Mobile folder
on the desktop

For Oracle employees and authorized partners only. Do not distribute to third parties. 34
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

11. Select all the code and COPY (control-C or by other means) all of the text.

For Oracle employees and authorized partners only. Do not distribute to third parties. 35
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

12. Back in JDeveloper, REPLACE all existing code in the GetAddressBookReports.java


file with the contents from the desktop file by PASTE (Control-V or other)

FROM:

TO:

13. Correct any errors that might appear as part of the copy/paste and then save the
source file.

For Oracle employees and authorized partners only. Do not distribute to third parties. 36
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

Create a jspx Page


1. In the JDeveloper Application Navigator pane, under the
View project, open the Web Content → WEB-INF folder.
Double click on the faces-config.xml file to open in the
editor pane.

2. Once the faces-config.xml opens in the editor pane, make sure the Diagram tab is
selected from the lower tabs in the editor pane. Then pull the JSF Page object from
the Component Palette pane into the editor.

3. Right click on the new page icon and select Create Page.

For Oracle employees and authorized partners only. Do not distribute to third parties. 37
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

4. Give the page a file name of addressBookList.jspx Make sure the “Create as XML
Document” and “Render in Mobile Device” check boxes are selected. Then open
up the “Page Implementation” section. Select “Do Not Automatically Expose UI
components in a New Managed Bean”. Then press the OK button.

5. After creating, it will open the new file (addressBookList.jspx) in a new tab. Return
to the faces-config.xml file, right click on the new page (addressBookList) and select
set as default run target.

For Oracle employees and authorized partners only. Do not distribute to third parties. 38
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

6. Notice the component should now have a green circle highlighting it, indicating it as
the default.

Create/Review a Data Control for the Managed Bean


Once the managed bean has been created and contains no errors, it is time to create the
data control that can be used for the form.

1. In JDeveloper, in the Application Navigator, right click on the


AddressBookQuery.java file and select Create Data Control

For Oracle employees and authorized partners only. Do not distribute to third parties. 39
© 2012 Oracle Corporation – Proprietary and Confidential
JDE Summit 2012 Labs

2. After a few minutes, there will be MANY new objects listed in the Application
Navigator, and it should look similar to this.

3. Use the new data control created to place controls on the jspx page. Open up the
addressBookList.jspx file again in the editor. Make sure it is active on the Source
tab of the edit pane. Find the h:form tag toward the bottom of the file. Place the
cursor in between the open and close form tag and put some whitespace between the
two by hitting enter a few times

For Oracle employees and authorized partners only. Do not distribute to third parties. 40
© 2012 Oracle Corporation – Proprietary and Confidential

You might also like