Setting the application parameters
In the ApplicationStartup class, look for the
parameterSettings() method and change it so that it contains the following code:
The method already contains the majority of the settings, but there are some that you need to configure manually. These settings include:
Setting the application’s starting page. Do this by setting the ENTRY_POINT parameter. Specify the ID of the page you want to set as the starting page. In this example, we want to display the orders page as the starting page, so specify
Next, we have to specify the application’s title. Use the APPLICATION_TITLE parameter to do this. Specify the text here that you want to display in the browser’s address bar.
Now we are ready with the parameters, but we still have to create the pages in the application.
Pages are created by using the
createPages() method in the
ApplicationStartup class. Modify the method, so the contents are the following:
Since there are three pages in the application, we have to write three lines. All lines are the same, only their parameters are different.
Register the pages in the JBStrap framework by using the
JBStrap.addPage() method. The first parameter of the method is the unique ID of the page that you can use later to reference the page. The second parameter is the UI class used to display the page. In this example, there is one UI only, so you have to specify this UI. The last parameter is the page class to be registered in the framework. Specify the previously created classes.
The pages are now registered, you only have to create the menu.