Monday, October 18, 2010

File attachment using Adf faces, EJB3 and Oracle XE database Part II

continued..

Step # II Create Entities from Database Tables,Session Bean & Data Controls
Creating Entities from database table
 


Create entities from table
  
 

Create database connection and provide the information of your XE Database
 


Select PERSON and ATTACHMENT tables to create entities
  
 

 


 


.
 
 

Entites should be created.
 You need to add Sequence annotation and define relationship of ATTACHEMTN table with PERSON table as follows.


  

  Creating Session bean


  


  

 


  We Also need to add following functions into our session bean


Then expose these functions to remote and local interfaces
Click on Structure, right click on function, click on EJB(N) and then properties you will see the dialog

Check on both checkboxes and click on OK button, the methods should be generated in remote and local interfaces. do the same with all newly added functions.
Now rebuild the model
Creating datacontrols
Right click on FileUploadFacadeBean and click on "Create Data Control" then click OK button
Data controls should be created.
To be continue -->
Coming up next "Taskflow for file upload popup"

No comments:

Post a Comment