publish
plugins.it2be_dialog info


Servoy Properties Summary
String build
Date buildDate
String component
String licensee
String typeLicensed
Number version
String versionLicensed


Servoy Methods Summary
Boolean register( String )
String showDialog( String, String, String, String, Array<String> )
String showErrorDialog( String, String, String, String, Array<String> )
String showInfoDialog( String, String, String, String, Array<String> )
String showInputDialog( String, String, String, String, String )
String showMultilineInputDialog( String, String, String, Number, String, String )
Array<String> showPasswordDialog( String, String, Object )
Array<String> showPasswordDialog( String, String, Object, Object, Object )
Array<String> showPasswordDialog( String, String, Object, Object )
Array<String> showPasswordDialog( String, String, Object, Object, Object, Object, Object )
Array<String> showPasswordDialog( String, String, Object, Object, Object, Object )
Array<String> showPasswordDialog( String, String )
String showQuestionDialog( String, String, String, String, Array<String> )
String showSelectDialog( String, String, String, String, Array<String> )
String showWarningDialog( String, String, String, String, Array<String> )
void startProgress( )
void stopProgress( )


Servoy Properties Details


build
String  build
Returns the current version (major, minor, build)
Returns
String  build String

Supported Clients
SmartClient


buildDate
Date  buildDate
Returns date release date
Returns
Date  date Date

Supported Clients
SmartClient


component
String  component
Returns the component name
Returns
String  name String

Supported Clients
SmartClient


licensee
String  licensee
Returns the licensee
Returns
String  licensee String

Supported Clients
SmartClient


typeLicensed
String  typeLicensed
Returns the type that is valid for this license
Returns
String  type String

Supported Clients
SmartClient


version
Number  version
Returns the current version (major, minor)
Returns
Number  version Double

Supported Clients
SmartClient


versionLicensed
String  versionLicensed
Returns the version that is valid for this license
Returns
String  license String

Supported Clients
SmartClient

Servoy Methods Details


register
Boolean  register( String )
Register your runtime license (use the Components Manager to request your license string)
Parameters
String  license  the license

Returns
Boolean  result boolean

Supported Clients
SmartClient

Sample
// You have to register your plug-in(s) and beans before you start using them
// One way to do so is create an 'onOpenSolution' method and add the 'register(.)' method(s) there
plugins.it2be_dialog.register("Insert the license string(s) from your '*_runtime_license.txt' file here!");


showDialog
String  showDialog( String, String, String, String, Array<String> )
Show dialog
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttons:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show dialog
// when the additional message is set to null or "" the dialog shows like the default dialog
// var thePressedButton = plugins.it2be_dialog.showDialog("Dialog","Show the dialog without any 'specials'");

// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var thePressedButton = plugins.it2be_dialog.showDialog("Dialog",
"Show this dialog",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"OK");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showErrorDialog
String  showErrorDialog( String, String, String, String, Array<String> )
Show error dialog
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttons:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show error dialog
// when the additional message is set to null or "" the dialog shows like the default dialog
// var thePressedButton = plugins.it2be_dialog.showErrorDialog("Error dialog","Show the error dialog without any 'specials'");

// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var thePressedButton = plugins.it2be_dialog.showErrorDialog("Error dialog",
"Show the error dialog",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"OK");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showInfoDialog
String  showInfoDialog( String, String, String, String, Array<String> )
Show info dialog
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttos:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show info dialog
// when the additional message is set to null or "" the dialog shows like the default dialog
// var thePressedButton = plugins.it2be_dialog.showInfoDialog("Info dialog","Show the info dialog without any 'specials'");

// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var thePressedButton = plugins.it2be_dialog.showInfoDialog("Info dialog",
"Show the info dialog",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"OK");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showInputDialog
String  showInputDialog( String, String, String, String, String )
Show input dialog, returns nothing when cancelled
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
String  initialValue:String  the initial value

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show input dialog, returns nothing when cancelled
// when the additional message is set to null or "" the dialog shows like the default dialog
// var typedInput = plugins.it2be_dialog.showInputDialog("Input dialog","What is your name?",null,"jan");

// the last value added is the default value
// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var typedInput = plugins.it2be_dialog.showInputDialog("Input dialog",
"What is your name?",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"jan");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showMultilineInputDialog
String  showMultilineInputDialog( String, String, String, Number, String, String )
Show input dialog with text area, returns nothing when cancelled
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
Number  lines:int  the lines
String  image:String  the media
String  initialValue:String  the initial value

Returns
String  result String

Supported Clients
SmartClient


showPasswordDialog
Array<String>  showPasswordDialog( String, String, Object )
Show password dialog
Parameters
String  title  the title
String  message  the message
Object  nameLabel  the name label

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showPasswordDialog
Array<String>  showPasswordDialog( String, String, Object, Object, Object )
Show password dialog
Parameters
String  title  the title
String  message  the message
Object  nameLabel  the name label
Object  passwordLabel  the password label
Object  checkPasswordLabel  the check password label

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showPasswordDialog
Array<String>  showPasswordDialog( String, String, Object, Object )
Show password dialog
Parameters
String  title  the title
String  message  the message
Object  nameLabel  the name label
Object  passwordLabel  the password label

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showPasswordDialog
Array<String>  showPasswordDialog( String, String, Object, Object, Object, Object, Object )
Show password dialog
Parameters
String  title  the title
String  message  the message
Object  nameLabel  the name label
Object  passwordLabel  the password label
Object  checkPasswordLabel  the check password label
Object  image  the media
Object  initialName  the initial name

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showPasswordDialog
Array<String>  showPasswordDialog( String, String, Object, Object, Object, Object )
Show password dialog
Parameters
String  title  the title
String  message  the message
Object  nameLabel  the name label
Object  passwordLabel  the password label
Object  checkPasswordLabel  the check password label
Object  image  the media

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showPasswordDialog
Array<String>  showPasswordDialog( String, String )
Show password dialog
Parameters
String  title  the title
String  message  the message

Returns
Array<String>  result String[]

Supported Clients
SmartClient

Sample
// Show password dialog
// it is possible to set the password dialog by simply calling the dialog without parameters
// in such case you will have a dialog only asking for the (login-)name
// var typedArray = plugins.it2be_dialog.showPasswordDialog();

// like with our other dialogs you can add an additional message and a custom icon
// the nameLabel, passwordLabel and checkPasswordLabel values can either be a boolean true/false
// for setting the label to it's default value or a new string (i18n or not)
// the last value added can be the initial name
var typedArray = plugins.it2be_dialog.showPasswordDialog("Login dialog",
"Enter your name and password?",
"Name",
"Password",
"Check password");

// the return value is an array
// the first value is the name, the second is the password
if (typedArray) {
name = typedArray[0];
password = typedArray[1];

application.output(name+"::"+password);
}


showQuestionDialog
String  showQuestionDialog( String, String, String, String, Array<String> )
Show question dialog
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttons:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show question dialog
// when the additional message is set to null or "" the dialog shows like the default dialog
// var thePressedButton =plugins.it2be_dialog.showQuestionDialog("Question dialog","Show the question dialog without any 'specials'");

// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var thePressedButton =plugins.it2be_dialog.showQuestionDialog("Question dialog",
"Show the question dialog",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"OK");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showSelectDialog
String  showSelectDialog( String, String, String, String, Array<String> )
Show select dialog, returns nothing when cancelled
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttons:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show select dialog, returns nothing when cancelled
// when the additional message is set to null or "" the dialog shows like the default dialog
// var selectedValue = plugins.it2be_dialog.showSelectDialog("Select dialog","Please select a name!",null,"jan","johan","sebastiaan");

// it is also possible to pass an array with the options
// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var selectedValue = plugins.it2be_dialog.showSelectDialog("Select dialog",
"Please select a name!",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
["jan","johan","sebastiaan"]);

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


showWarningDialog
String  showWarningDialog( String, String, String, String, Array<String> )
Show warning dialog
Parameters
String  title:String  the title
String  message:String  the message
String  additionalMessage:String  the additional message
String  image:String  the media
Array<String>  buttons:String[]  the nth button

Returns
String  result String

Supported Clients
SmartClient

Sample
// Show warning dialog
// when the additional message is set to null or "" the dialog shows like the default dialog
// var thePressedButton = plugins.it2be_dialog.showWarningDialog("Warning dialog", "Show the warning dialog without any 'specials'");

// the fun part of the dialog is that it is possible to add a custom icon and an additional message
var thePressedButton = plugins.it2be_dialog.showWarningDialog("Warning dialog",
"Show the warning dialog",
"Additional message to explain what to do, what happened or whatever you want",
"media:///yourImage.gif", //replace this with your own image otherwise the dialog will show up without an icon
"OK");

// REMARK: when you want to show the dialog with the default icon simply remove the
// media path. The plugin will notice that no icon is selected and start building the buttons.


startProgress
void  startProgress( )
Dim your window and show a progress animation.
Returns
void  

Supported Clients
SmartClient

Sample
// Dim your window and show a progress animation.
// Catch an error here in case something goes wrong
// the stop() method is always reached and the animation doesn't stay on top
// Start the progress animation
try {
// start running the animation
plugins.it2be_dialog.startProgress();

// Execute your code here instead of sleep
application.sleep(5000);
} catch (e) {
// this will be output after an error occured
application.output(e.name + ': ' + e.message);
} finally {


stopProgress
void  stopProgress( )
Stop the progress animation.
Returns
void  

Supported Clients
SmartClient

Sample
// Dim your window and show a progress animation.
// Catch an error here in case something goes wrong
// the stop() method is always reached and the animation doesn't stay on top
// Start the progress animation
try {
// start running the animation
plugins.it2be_dialog.startProgress();

// Execute your code here instead of sleep
application.sleep(5000);
} catch (e) {
// this will be output after an error occured
application.output(e.name + ': ' + e.message);
} finally {