Monday 2 November 2015

View Object Programmatically called in java class

As Salamo alaikum wa rahmatullah

package demo.vo.example.view;

import demo.vo.example.model.EmployeesViewImpl;

import demo.vo.example.model.EmployeesViewRowImpl;

import oracle.jbo.ApplicationModule;

import oracle.jbo.client.Configuration;

public class AppModuleTest {
   public static void main(String[] args) {
       ApplicationModule appModule=Configuration.createRootApplicationModule("demo.vo.example.model.AppModule", "AppModuleLocal");
       EmployeesViewImpl vo = (EmployeesViewImpl)appModule.findViewObject("EmployeesView1");
       while(vo.hasNext()){
           EmployeesViewRowImpl row = (EmployeesViewRowImpl)vo.next();
           System.out.println(row.getFirstName()+row.getLastName()+row.getEmail());
//           System.out.println(row.getLastName());
       }
   }
}

Project Reference



--
Ma Asalaam
Passion for Oracle

No comments:

Post a Comment