JBStrap client

JBStrap creates a Client object for each user session (users who currently use the same web application). This object represents a client accessing the web application. Therefore, it handles all the necessary client operations as well as gets its properties; it is not a visible component. The Client also handles two important events. Read more on the client events in this chapter .

A Client handles client communication and background task execution (e.g. setting the page title, getting the client's properties such as user language and browser type). Popup alerts and notifications and cookies are also handled directly by the Client class. The class is capable of executing JavaScript code .

Use the Client to get the name of the UI the client is assigned to or displayed on, the name of the logged in user, the application name, the application host name, the current language setting and browser type. By default, user language is the same as the language used in the browser.

The Client object provides the following services:

Client context

Getting the current page:

Getting the current user:

Getting the client language:

Use the Client to set the page title and the page icon: changes will be immediately committed.

Setting the page title :

Setting the page icon (favicon):

Alerts and notifications

From a technical point of view, the Client is responsible for handling alerts and notifications. The reason for this is when an alert or a notification pops up, the UI or the page might not be loaded.

It is this simple to use alerts and notifications in JBStrap:


Success popup

To read more about this topic, visit the Alerts and notifications chapter in the Components section.