Problem
How can I open a form in the same window of the form caller, and occur when the form is closed.
Solution
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
frm.getExtended().funcTest();
//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);
}
});
