Jbstrap Pages

Pages are the primary – and invisible – objects of the application. The user may navigate between pages. You can place components on these pages: only the components are the visible parts of a page.

How to Build a Page

Every page used in the application must extend from the BasePage class. The pages must also be registered correctly in the framework. (See: Building a Page ). When registering pages, a unique pageID is assigned, and the UI on which the page will be displayed must also be specified. During this process, page parameters can also be specified, which can be used when creating pages. A page can be registered multiple times, with different parameters or assign them to different UIs - however in this instance, new unique pageIDs must be used.

Page Parameters

You can access page parameters with the protected variable params . Parameters are either provided upon registration or during navigation. (Note: a navigation parameter is “stronger” than a registration parameter and will thus overwrite it.) These parameters are combined when passed to the page, meaning that if a parameter defined during navigation has the same name as a parameter defined during page registration, the navigation parameter will overwrite the registration (default) parameter.

Page parameters are contained in the Parameters class. This class can store any type of parameter. To access the parameters, reference them by their name. The values of every parameter can also be queried. For more information see Parameters .

Security

Just as with the UI, there are two types of pages: a public and private. Public pages can be viewed by anyone, whereas private pages can only be viewed by those with access rights (and logged-in users). Whether a page is private or public can be given by using an annotation or programmatically; if not provided, by default, a page will be created as a private page.

Access to private pages can be further restricted, see Access Control and Security for more information. If the user wants to access a restricted page without proper access rights or being logged in, the user will be redirected to the login page. After a successful login, the user will be redirected to the requested page. This applies to regular navigation, as well to soft and hardlink navigations, the user will only see content that they have the rights to see.

Related pages