Dialogpage in Mainintialisation

  • 29 January 2024
  • 3 replies

Badge +3

I want to open dialogpage whenever we open application. I have tried to open dialog page from mainintilisation. its giving error. let me know if we should open dialog page from mainintilisation.


Best answer by Edo Nijmeijer 30 January 2024, 10:00

View original

3 replies

Userlevel 5
Badge +6

After MainInitialization, AIMMS run the Libraries MainInitialization, then PostMainInitialization will run. This is probably why you are facing errors, try moving the OpenDialogPage to PostMainInitialization.  

Badge +3

I moved openDialogPage to PostMainintilization. still i am seeing same error (pageId cannot be empty when opening a dialog page.)

Userlevel 4
Badge +4

I’ve been asking around within the WebUI team to hear if there is a clear explanation of ‘the order of things’, at this stage of initialization and with respect to the WebUI. And I have to say now: there isn’t.

In order for the Dialog Page to be able to show, it certainly does need ‘WebUI’ to be present in a state that allows it to communicate with a model and have access to the available pages. MainInitialization seems like an unreliable place to try and hook into this exact moment. PostMainInitialization obviously comes ‘later' but could still be too early. I’m sorry I can’t be any more specific within actually diving into some experimentation myself.

All that being said, I guess it becomes important to see what your use case is, and what you’re actually trying to achieve. Maybe it is easier to just open the dialog from the onLoad of a (home) page?


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator