Please enable JavaScript to view this site.

The manual for the JobRouter developer

Navigation: Dashboard API > Methods and objects of the dashboard API > Overwritable methods

State of the widget (isMandatory)

Scroll Prev Top Next More

 

With this method it is possible to define the widget status. The method returns a boolean value, which determines if it is a mandatory or optional widget. Without the use of this method the widget will be defined as optional.

Please note: Widgets moved or renamed in the file system will be automatically removed from the user setting, and will not be displayed on the dashboard any more. Due to performance reasons, the setting of the removed widgets will stay as long in the user settings, as the dashboard will be adapted by the user (e.g. by adding a new or moving an existing widget).

Mandatory widget

In the widget menu mandatory widgets cannot be selected by the user. The widget is displayed automatically and initially on the upper left side, provided that the user has the according Rights. The user cannot delete the widget from the dashboard. Though the user can move, enlarge, or minimize the widget at any time.

Example:

public function isMandatory()

{

    return true;

}

Optional widget

The user can add optional widgets to the dashboard any number of times. When added, the widget is displayed initially on the upper left side of the dashboard. The user can delete a widget from the dashboard by clicking the Close button. Furthermore, it is possible for the user to move, enlarge, or minimize the widget.

Example:

public function isMandatory()

{

    return false;

}