Implemented

CurrentRegularPage

  • 16 October 2019
  • 7 replies
  • 170 views

Userlevel 2

Hi, 

 

The set “AllRegularPages” contains a parameter “CurrentRegularPage”,  in the comment of this set the following is mentioned:

“The element parameter CurrentRegularPage can be used to identify the pageId the user is on currently. ”

So, I would expect that “CurrentRegularPage” is filled with the ID of the page which is open in the WebUI. However, this parameter is empty in my project.

 

Is this a bug or should I use this parameter in a different way?


Regards,
Olmo​​​​​​​

Gertjan 9 months ago

Has anyone tried the experimental feature we released for this in 4.72 (mid March)? Be sure to activate “WebUI State Support” as Experimental Feature.

 

Please share your results/feedback! 

 

  • webui::AllOpenWebUITabs - This set contains one element for each WebUI tab currently open. The element has the form of a UUID.

  • webui::LastActiveWebUITab - An element parameter in AllOpenWebUITabs, which contains the UUID of the currently open WebUI tab in the browser (if any, it is empty otherwise).

  • webui::CurrentPageId - This string parameter contains the currently loaded page ID for all open tabs.

  • webui::CurrentSidePanelPageId - This string parameter contains the page ID for all open currently loaded side panels.

From, https://documentation.aimms.com/webui/library.html#pages-and-dialog-support-section

View original

7 replies

Userlevel 4

Hi @OlmoVerhagen,

This is currently not in use. We have added this for the exact reason that you have mentioned. 

We will be working on implementing this in the near future.

 

I will update the comments section to mention the same. 

 

Thanks.

Userlevel 2

ah oke! In the meantime, do you have any suggestions for identifying the current page?

In another project I did something with a page open procedure and a unique number per page. However, this was quite cumbersome to maintain so I’m preferring something else.

Userlevel 6

@OlmoVerhagen , unfortunately nothing yet. Hence the idea to add this (as we recognize the cumbersome way you proposed, but don’t have a better one yet).

 

Curious to learn about your use case; what do you like to achieve with knowing the Current Page you are on? 

Userlevel 4

I moved this topic to the ‘Share Your Ideas’ forum.

Userlevel 3

This is really needed when creating a workflow that the user can’t walk around without consistencies. The openPage procedure does not work because I’m using an workflow. Any other ideas in how to control in which page the user is? 

Userlevel 6

Good news, we are currently in building mode for this feature; saw the concept working yesterday during an internal demo. We hope to release this in the upcoming release, or the release thereafter. 

Indeed, in workflow, this could be very valuable.

An example I created was the following Validation Routine to have just one validation return behind the PageActions procedure (equal for all steps). This removes for me the need to build custom ‘Upon Load’ procedures for each page and I can generalize a lot of the workflow and page actions improving the flow and reducing the maintenance effort of my model. Also added pages to the workflow and validating those becomes a matter of ‘just’ adding a page and adjusting the model code to what is needed on that page. 

switch MyCurrentPageID do 

'step1':

webui::SetProgressMessage("Validating Step 1");
! Validate something if okay, activate step 2 and go there:
InputWorkflow( 1, 2, 'workflowPageState' ) := "active" ;
webui::OpenPage('step2');

'step2':

webui::SetProgressMessage("Validating Step 2");
! Validate something if okay, activate step 3 and go there:
InputWorkflow( 1, 3, 'workflowPageState' ) := "active" ;
Webui::OpenPage('step3');

'step3':

webui::SetProgressMessage("Validating Step 3");
! Validate something if okay, and give message:
webui::SetProgressMessage("All Steps Completed");

endswitch;

 

 

Userlevel 6

Has anyone tried the experimental feature we released for this in 4.72 (mid March)? Be sure to activate “WebUI State Support” as Experimental Feature.

 

Please share your results/feedback! 

 

  • webui::AllOpenWebUITabs - This set contains one element for each WebUI tab currently open. The element has the form of a UUID.

  • webui::LastActiveWebUITab - An element parameter in AllOpenWebUITabs, which contains the UUID of the currently open WebUI tab in the browser (if any, it is empty otherwise).

  • webui::CurrentPageId - This string parameter contains the currently loaded page ID for all open tabs.

  • webui::CurrentSidePanelPageId - This string parameter contains the page ID for all open currently loaded side panels.

From, https://documentation.aimms.com/webui/library.html#pages-and-dialog-support-section

Reply


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

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