odd result controller.getFormContext?

Hi All,

before executing my ‘onSearch’ method, I had to check whether a specific form was in dialog or not.
So, I tried to read the result of the following functions right at the top of this ‘onSearch’ method:

  1. controller.getContainerName();
  2. controller.getFormContext();
  3. application.isFormInDialog(); (I know: it’s deprecated, but still…)

below the results with and without this form shown in dialog:

  1. dialog

  2. row_1[dialog, sys_dlg_findDate, null, null, null]

  3. true

  4. row_1[dialog, sys_dlg_findDate, null, null, null]

  5. false

Notice the getFormContext() function keeps telling me it’s in dialog while it isn’t
This behaviour is noticeable after having this form has been displayed once in a dialog.

Is this expected behaviour or should I file a case?

Thnkx!

no this is expected behavior
getFormContext() gives you the current structure of parents where the forms is in at the time of the call…
And yes if you just show that form in the dialog then close the dialog and you don’t do anything else it will give you that information.

the controller.getContainerName() should return null if the dialog is not visible.

hmmm I’d expected the current state as in ‘refreshed state’.