How can I open a form in the same window of the form caller, and occur when the form is closed.


To open a form you should use the following code:

//Open the form
dataweb.client.components.Form frm = client.openForm(session, "<package>.<form>", thisForm.getContainer(), thisForm);

//Call any form of public functions

//Check if the form is closed
frm.addFormListener(new dataweb.client.components.event.FormAdapter(){

   public void formClosed(dataweb.client.components.event.FormEvent source){
      //It calls or when the form is closed

   public void formClosing(dataweb.client.components.event.FormEvent source){
      //Called before the form closes
      //you can cancel the closing with source.setCancel(true);


Published in Fri, 10 December 2010 17:28