Don't have an Vision instance to practice these tutorials? Visit http://cholagls.com/products-/11i-virtual-machine for details.Our smart solution to smart people like you !!
Initial Steps
1.Create a new OA Project by right clicking on the Applications. Name the project as HomePage.Set the runtime properties and the database connection.
UserName - sysadmin
Password - sysadmin
Application Short Name - FND
Responsibility - APPLICATION_DEVELOPER
2.Create a new AM.Right click on the project.Select new->Business Tier->ADF Business Components and then Application Module.
Name - UsersAM.
PAckage - chola.oracle.apps.fnd.home.server
VO
3.Create a new View object.Right click on chola.oracle.apps.fnd.home.server package and select New View Object.
Name - UserVO
Package - chola.oracle.apps.fnd.home.server
Click next. The VO is not based on any EO.Go to the query page and paste the below query:
select user_name,user_id,email_address from fnd_user
Click next and finish.
Edit the UsersAM and shuttle the UsersVO to the right side.Click ok.
Region
4.Now lets create a region.Right click on project and click new->Web Tier->OA Components->Region.

Name - UsersRN
Package - chola.oracle.apps.fnd.home.webui
Region Style - stackLayout

Click Ok.
In the structure pane right click on UsersRN and click New region using wizard.
Select the UsersAM from the drop down list and click UsersVO1 and click next.

Select the RegionStyle as Table.Click next.

Shuttle all the attributes to the right side.Click Next.

Change the item style of all the attributes to messageStyledText.Click and Finish.

Code
5.Right click on the UsersRN and click set new Controller.
Name - UsersCO
Package - chola.oracle.apps.fnd.home.webui

ProcessRequest Code:
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
Number id=pageContext.getUserId();
System.out.println("id"+id);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
Class paramTypes[] = { Number.class};
Serializable[] parameters = { id };
am.invokeMethod("initDetails", parameters,paramTypes);Â Â
}
UsersAMImpl.java :
public void initDetails(Number id)
{
UsersVOImpl vo =(UsersVOImpl) getUsersVO1();
if (vo == null)
{
MessageToken[] errTokens = { new MessageToken("OBJECT_NAME", "EmployeeFullVO1")};
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
}
vo.initQuery(id);
}
UsersVOImpl.java:
public void initQuery(Number id)
{
if ((id != null) )
{
setWhereClause("USER_ID = :1");
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, id);
executeQuery();Â Â
}
}
Deployment
Now that we have created the region. Lets deploy the Region,VO and AM.Open winscp and shift the chola directory from the myclasses folder to the $JAVA_TOP in the server.
In the putty put
cd $JAVA_TOP
and paste the following command which will import the Region.
java oracle.jrad.tools.xml.importer.XMLImporter $JAVA_TOP/chola/oracle/apps/fnd/home/webui/UsersRN.xml -username APPS -password apps -dbconnection "(DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=chola01.apps)(PORT=1523)) (CONNECT_DATA= (SID=VIS) ) )" -rootdir . ;
Since we have put the classes folder to the server we dont have to compile the java files.
Personalize
Now we will personalize the home page and add this region to the home page.
Login to the application using sysadmin/sysadmin.
In the home page click Personalize page.

Click on the complete view and click expand all.By doing this all the components will be expanded and it will be easy to determine where we want to add the new region.

we are going to display the region on the right side after the favourites. So we will create a new item in the favouritesRightcell.Click on the Create item in the right side of favouritesRightcell.

Set the following properties for the item:
ID - CholaUsersPage
Extends - /chola/oracle/apps/fnd/home/webui/UsersRN
Prompt - Chola Users
Click Apply.

Come to the bottom of the page and click Return to Application.
You can notice a new region in the right side below the Favourites displaying the username,user id and the email address.

Since we logged into the application as Operations user. The details is displayed as OPERATIONS.
Related Posts:
Set as favorite
Bookmark
Report Article
Hits: 878
Trackback(0)
Comments (1)

Thiagu
said:
|
... Hi, I have tried the above steps to add a region to one of the seeded pages. When i enabled diagnostics, I can see that the view object is executed. However no data is displayed on the table. Instead it says 'No search conducted.' When I executed the query, it fetched records. Can you please suggest me where I would have gone wrong? Regards, Thiagu M |
|
Write comment

















