Represents the dialog box.
Members
An enum for the type of buttons in the dialog box
Properties:
| Name |
Type |
Description |
OK_BUTTON |
String
|
To add the button OK in the dialog box |
APPLY_BUTTON |
String
|
To add the button Apply in the dialog box |
CANCEL_BUTTON |
String
|
To add the button Cancel in the dialog box |
Example
// Hides the Apply Button
WebiApplication.dialogbox.setButtonDisplayed(
{
button:WebiApplication.dialogbox.Buttons.APPLY_BUTTON,
display:false
});
...
(static) Events
An enum for the type of events that can occur from the dialog box
Properties:
| Name |
Type |
Description |
OK_CLICK |
String
|
The event with the button OK is clicked in the dialog box |
APPLY_CLICK |
String
|
The event associated with the button Apply clicked in the dialog box |
CANCEL_CLICK |
String
|
The event associated with the button Cancel clicked in the dialog box |
Example
//OK_CLICK event handler
WebiApplication.addEventListener(
{
eventType:WebiApplication.dialogbox.Events.OK_CLICK,
callback:function(evenType)
{
WebiApplication.setWaitCursorDisplayed(true);
var frm = document.actionItemForm;
frm.elements["nbRows"].value = nbRows;
frm.target = "HiddenFrame";
frm.action = "processActionItems.jsp";
frm.submit();
}
});
...
//CANCEL_CLICK event handler
WebiApplication.addEventListener(
{
eventType:WebiApplication.dialogbox.Events.CANCEL_CLICK,
callback:function(evenType)
{
WebiApplication.dialogbox.close();
}
});
Methods
Sets the default button of the dialog box.
Parameters:
(static) close()
Closes the current dialog box.
(static) resize(obj)
Resizes the dialog box.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Properties
| Name |
Type |
Description |
width |
String
|
the dialog box width in pixels |
height |
String
|
the dialog box height in pixels |
|
Example
WebiApplication.dialogbox.resize({"width":600,"height":400});
Disables or enables the button of the status bar.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Properties
|
Displays or hides the button of the status bar.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Properties
|
(static) setButtonText(obj)
Sets the text that displays inside the button.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Properties
|
Sets the text to display in the tooltip of the button.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Properties
|
(static) setTitle(title)
Sets the dialog box title.
Parameters:
| Name |
Type |
Description |
title |
String
|
the dialog box title |
Example
WebiApplication.dialogbox.setTitle('Report Specification');