Thursday, October 29, 2009

To get viewObject from Java File and create new row

Assume that you have an application with HR schema and make a Department viewObject.

To get viewObject:
DepartmentsViewImpl dv = (DepartmentsViewImpl)findViewObject("DepartmentsView1");

To get current row:
DepartmentsViewImpl dv = (DepartmentsViewImpl)findViewObject("DepartmentsView1");
DepartmentsViewRowImpl r = (DepartmentsViewRowImpl)dv.getCurrentRow();

To create new row:
DepartmentsViewImpl dv = (DepartmentsViewImpl)findViewObject("DepartmentsView1");
DepartmentsViewRowImpl r = (DepartmentsViewRowImpl)dv.createRow();
dv.insertRow(r);

1 comment:

  1. Hi!
    Thank you but now how do i set the values for the attributes for the row programatically?
    thank you for your response

    ReplyDelete