Namespace: dialogbox

WebiApplication.dialogbox

Represents the dialog box.

Members

(static) Buttons

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

(static) attachDefaultButton(button)

Sets the default button of the dialog box.
Parameters:
Name Type Description
button WebiApplication.dialogbox.Buttons the type of button

(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});

(static) setButtonDisabled(obj)

Disables or enables the button of the status bar.
Parameters:
Name Type Description
obj Object
Properties
Name Type Description
button WebiApplication.dialogbox.Buttons the type of button
disable Boolean true to disable the button, false otherwise

(static) setButtonDisplayed(obj)

Displays or hides the button of the status bar.
Parameters:
Name Type Description
obj Object
Properties
Name Type Description
button WebiApplication.dialogbox.Buttons the type of button
display Boolean true to display the button, false otherwise

(static) setButtonText(obj)

Sets the text that displays inside the button.
Parameters:
Name Type Description
obj Object
Properties
Name Type Description
button WebiApplication.dialogbox.Buttons the type of button
text String the button text

(static) setButtonTitle(obj)

Sets the text to display in the tooltip of the button.
Parameters:
Name Type Description
obj Object
Properties
Name Type Description
button WebiApplication.dialogbox.Buttons the type of button
title String the text used in the tool tip

(static) setTitle(title)

Sets the dialog box title.
Parameters:
Name Type Description
title String the dialog box title
Example
WebiApplication.dialogbox.setTitle('Report Specification');