Creating a WebUI¶
Here you can find a summary of the steps to be taken for creating a WebUI for your AIMMS app:
Check the Requirements section.
Download (the latest version of) the AIMMS development system.
Make sure you have the latest version of preferably the Chrome browser (as it performs the best), or Microsoft’s Internet Explorer 11 or Edge.
In the AIMMS development system, open an existing application or create a new one.
New application projects contain the
AimmsWebUIsystem libraries by default. If you already have an older project, it might not contain these libraries, yet. In that case, you need to extend your model with these libraries. To add AIMMS libraries to your model: go to the Library Manager of AIMMS (in the File menu) and select Add System Library.
Start WebUI by clicking on WebUI in the AIMMS toolbar, or by using the WebUI (sub)menu in the AIMMS Tools menu. The first time, this will create a WebUI folder in your Main Project subfolder. When using Start WebUI, the WebUI is started without opening a browser. When you select one of the browsers, WebUI is started and the browser is opened at the home page of your app.
As mentioned in Requirements section, support for Internet Explorer 11 has been deprecated. Should you nevertheless run IE11, please note that there is a known problem: if you face a blue screen after starting your WebUI app in the browser, you should verify that the setting “Display Intranet Sites in Compatibility View” is set to unchecked. You can find this option under “Compatibility View Options” in the main menu of IE11.
To be able to control which identifiers are visible to the end-user when adding content to the WebUI pages (more specifically, when selecting the contents for an existing widget), you can extend your AIMMS model with a set called
AllPublicIdentifiers (in the global Main namespace of your app). This set should be a subset of the predefined set
AllIdentifiers and should be initialized with those identifiers which you want to make public to the end-user of the WebUI.
When running in development mode, the contents of this set is ignored. This means that you can simply see all identifiers declared in your model from within the WebUI which you are building. When deploying your finished WebUI application on AIMMS PRO for the end-users, only the identifiers which are in the set
AllPublicIdentifiers are available to end users who try to add or modify contents of the existing widgets in the app. However, if you, as an app developer, have created widgets containing identifiers not present in the
AllPublicIdentifiers set, the end-user is still able to see the data of these identifiers through these widgets, taking into account whether the WebUI is authorized to display the data of such identifiers (see the Authorization section above).
As a result of the way of working described above, if the set
AllPublicIdentifiers is declared in your model but is empty, then all identifiers are available to the WebUI app developer when in developer mode, but no identifiers are available to the end user when running the WebUI app on the PRO platform (i.e. if the end user tries to add or modify contents in existing widgets). In such a case, the end user may only use the existing widgets with the content identifiers set up initially by the app developer.
If the set
AllPublicIdentifiers is not declared, then all the identifiers in your model are available in both developer mode and the app published on PRO.
Identifiers in a Library¶
To be able to show data for identifiers that are declared in an AIMMS library, you need to make those identifiers public by putting them in the Interface attribute of the library. The corresponding index domain sets need to be present in the library interface too. Please remember to add them to the set
AllPublicIdentifiers, if you have specified this set in your model.
One may wonder why should the corresponding index domain sets be present in the library interface? The reason is that these index domain sets are used to display aggregated values (by pivoting/moving indices to the Aggregated group) in a widget. More precisely, AIMMS creates runtime identifiers in order to calculate these aggregated values (such as totals). To be able to evaluate the definitions of these runtime identifiers, the domain indices of the identifier need to be accessible too.
When adding project-specific translations to your WebUI project and (some of) the translation identifiers are located in a library, please make sure to include the library prefixes to the .properties translation file.
Last Updated: July, 2020