I created my own form with two command buttons: a cancelButton and an OkButton.
I added the following logic to my form:
public boolean closedOk()
{
DoMyLogic();
ret = super();
return ret;
}
Now I noticed that both my Ok and my Cancel buttons call this closedOk method.
This goes into error and the form is never getting closed.
I checked that the form controls match the desired form design:
I tried adding the following method:
[Control("CommandButton")]
class CancelButton
{
public void clicked()
{
element.closeCancel();
}
}
I also tried the same with element.Close(), but still to no avail.
I did see that my closedOk is still being called by the FormRunServicesManager.updateLifeCycleStage method.
It seems to my the logic does not understand my button is supposed to be a 'cancel'-button, but I would not know why.
Does anyone know why this is happening?