Child pages
  • dialogs
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

The Dialogs plugin provides a few convenient functions to quickly show a dialog. It supports the following types of dialogs:

  • Error dialog
  • Info dialog
  • Input dialog
  • Question dialog
  • Select dialog
  • Warning dialog

Currently this plugin is only supported in the Smart Client. ServoyForge hosts a drop-in replacement for the Dialogs plugin adds support for the same type of Dialogs and this plugin, but then equally supported in both the Smart and Web Client. This Dialogs module can be found here.

Method Summary
String #showErrorDialog(dialog_title, msg, [...button])
Shows a message dialog with the specified title, message and a customizable set of buttons.
String #showInfoDialog(dialog_title, msg, [...button])
Shows a message dialog with the specified title, message and a customizable set of buttons.
String #showInputDialog(dialog_title, msg, [initialValue])
Shows an input dialog where the user can enter data.
String #showQuestionDialog(dialog_title, msg, [...button])
Shows a message dialog with the specified title, message and a customizable set of buttons.
String #showSelectDialog(dialog_title, msg, optionArray/option1, [...option])
Shows a selection dialog, where the user can select an entry from a list of options.
String #showWarningDialog(dialog_title, msg, [...button])
Shows a message dialog with the specified title, message and a customizable set of buttons.

Method Details
showErrorDialog

String showErrorDialog (dialog_title, msg, [...button])

Shows a message dialog with the specified title, message and a customizable set of buttons.
Parameters
dialog_title
msg
[...button]
Returns
String
Sample
//show dialog
var thePressedButton = plugins.dialogs.showErrorDialog('Title', 'Value not allowed','OK');
showInfoDialog

String showInfoDialog (dialog_title, msg, [...button])

Shows a message dialog with the specified title, message and a customizable set of buttons.
Parameters
dialog_title
msg
[...button]
Returns
String
Sample
//show dialog
var thePressedButton = plugins.dialogs.showInfoDialog('Title', 'Value not allowed','OK');
showInputDialog

String showInputDialog (dialog_title, msg, [initialValue])

Shows an input dialog where the user can enter data. Returns the entered data, or nothing when canceled.
Parameters
dialog_title
msg
[initialValue]
Returns
String
Sample
//show input dialog ,returns nothing when canceled 
var typedInput = plugins.dialogs.showInputDialog('Specify','Your name');
showQuestionDialog

String showQuestionDialog (dialog_title, msg, [...button])

Shows a message dialog with the specified title, message and a customizable set of buttons.
Parameters
dialog_title
msg
[...button]
Returns
String
Sample
//show dialog
var thePressedButton = plugins.dialogs.showQuestionDialog('Title', 'Value not allowed','OK');
showSelectDialog

String showSelectDialog (dialog_title, msg, optionArray/option1, [...option])

Shows a selection dialog, where the user can select an entry from a list of options. Returns the selected entry, or nothing when canceled.
Parameters
dialog_title
msg
optionArray/option1
[...option]
Returns
String
Sample
//show select,returns nothing when canceled 
var selectedValue = plugins.dialogs.showSelectDialog('Select','please select a name','jan','johan','sebastiaan');
//also possible to pass array with options
//var selectedValue = plugins.dialogs.showSelectDialog('Select','please select a name', new Array('jan','johan','sebastiaan'));
showWarningDialog

String showWarningDialog (dialog_title, msg, [...button])

Shows a message dialog with the specified title, message and a customizable set of buttons.
Parameters
dialog_title
msg
[...button]
Returns
String
Sample
//show dialog
var thePressedButton = plugins.dialogs.showWarningDialog('Title', 'Value not allowed','OK');
  • No labels