15 December, 2012

ADF : Open Page in insert Mode

While developing data entry pages, the major request of the user is opening the page in Insert Mode ( Ready for entry).

To do this requirement we do the below steps
1- Execute executeEmptyRowSet() method for master ViewObject used in page.
2- Insert new empty row in master ViewObject
3- Make inserted row as current row in master ViewObject

I developed the below method in ApplicationModuleImpl for doing the previous steps.
You pass view object named used in application module.

   public void initInsertMode(String viewObjectName) {  
     ViewObject viewObject = this.findViewObject(viewObjectName);  
     viewObject.executeEmptyRowSet();  
   
     Row row = viewObject.createRow();  
     viewObject.insertRow(row);  
     viewObject.setCurrentRow(row);  
   }  

Import the following Classes

 import oracle.jbo.Row;  
 import oracle.jbo.ViewObject;  

I published before a post about Insert Rows in ADF View Object Programatically , it may be useful, you can read it from here   

Thanks

4 comments:

  1. Why not use the "Create" or "CreateInsert" operation on the view object as the first component on the task flow which is responsible for displaying the edit page?

    ReplyDelete
  2. Why not use the "Create" or "CreateInsert" operation on the view object as the first component on the task flow which is responsible for displaying the edit page?

    ReplyDelete
  3. Thank u very much!It's helpful!

    ReplyDelete
  4. My spouse and I love your blog and find almost all of your posts to be just what I’m looking for. Appreciating the persistence you put into your blog and the detailed information you provide. I found another one blog like you Oracle ADF.Actually I was looking for the same information on internet for Oracle Application Development Framework and came across your blog. I am impressed by the information that you have on this blog. Thanks once more for all the details.

    ReplyDelete

ADF : Scope Variables

Oracle ADF uses many variables and each variable has a scope. There are five scopes in ADF (Application, Request, Session, View and PageFl...