Wednesday, November 18, 2009

JDev 11g - ADF Mobile on my Blackberry

Pre-requisites
· Access to the SCOTT schema on an Oracle DB

· Blackberry Email/MDS server simulator > BlackBerry_Email_MDS_4.1.4.exe

· Blackberry simulator E.g.
> BlackBerry_Simulators_4.6.1.168_8900-Vodafone.exe
· Both downloadable from http://na.blackberry.com/eng/developers/browserdev/devtoolsdownloads.jsp


Install / Start Blackberry Software
· Install both simulators

· Start MDS emulator
--> Start Programs --> Research in Motion --> Blackberry Email and MDS Services Simulators 4.1.4 --> MDS

This will open a cmd window.

· Start Blackberry 8900 emulator
--> Start --> Programs --> Research in Motion --> Blackberry Smartphone Simulators 4.6.1. --> 4.6.1.168 --> 8900-Vodaphone

This will start up the Simulator.


Create the ADF Mobile App

· Create a new application in JDev 11g --> Fusion Web Application (ADF)
. Enter app name --> Accept defaults on all other screens
Create the data model
--> Right-mouse click on the Model project -->
--> New... ADF Business Components --> ...from Tables


· Create a new DB Connection


· Select Entity Objects


· Select View Objects


· Specify Application Module


Create the UI

· Double-click on faces-config.xml in the ViewContrioller project
--> Drop a JSF page onto the designer


Double-click to create the page
--> Select Render in Mobile Device



Drop EmpView as a Tables --> Trinidad Read only table




Run mobile.jspx



Looks good in IE, but let’s change the project setting so as to avoid having to type such a long URL in the Blackberry.

--> Right-click on ViewController project
----> Project properties --> Java EE Application Change context root to xyz
Re-test in IE

Test in Blackberry

Open browser


Type in the URL
I have installed the MSFT loopback adapter on my machine (ip address = 1.1.1.1) so that is what I use here. e.g. http://1.1.1.1:7101/xyz/faces/mobile.jspx


You can enable JavaScript and create a couple of more interesting pages





No comments:

Post a Comment