Child pages
  • dialogs

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}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|https://www.servoyforge.net] 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|https://www.servoyforge.net/projects/mod-dialog].{sub-section}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#showErrorDialog]\(dialog_title, msg, \[...button\])
Shows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#showInfoDialog]\(dialog_title, msg, \[...button\])
Shows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#showInputDialog]\(dialog_title, msg, \[initialValue\])
Shows an input dialog where the user can enter data.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#showQuestionDialog]\(dialog_title, msg, \[...button\])
Shows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#showSelectDialog]\(dialog_title, msg, optionArray/option1, \[...option\])
Shows a selection dialog, where the user can select an entry from a list of options.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#showWarningDialog]\(dialog_title, msg, \[...button\])
Shows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=showErrorDialog|class=node}{tr:id=name}{td}h6.showErrorDialog{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showErrorDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showErrorDialog_des|text=|trigger=button}{sub-section}{sub-section:showErrorDialog_des|trigger=none|class=sIndent}Shows a message dialog with the specified title, message and a customizable set of buttons.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showErrorDialog_snc|text=|trigger=button}{sub-section}{sub-section:showErrorDialog_snc|trigger=none|class=sIndent}  Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showErrorDialog_prs|text=|trigger=button}{sub-section}{sub-section:showErrorDialog_prs|trigger=none|class=sIndent}dialog_title
msg
\[...button\]
{sub-section}dialog_title
msg
\[...button\]
{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=retsee}{td}*ReturnsAlso see*\\{sub-section:showErrorDialog_ret|text=|trigger=button}{sub-section}{sub-section:showErrorDialog_ret|trigger=none|class=sIndent}[String]{sub-sectiondiv:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:showErrorDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showErrorDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showErrorDialog_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showErrorDialog_link|trigger=none}{sub-section}{div}code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showErrorDialog('Title', 'Value not allowed','OK');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showInfoDialog|class=node}{tr:id=name}{td}h6.showInfoDialog{td}{tr}{builder-show}{tr:id=samsig}{td}*Sample*\\{sub-section:showErrorDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showErrorDialog_sam|trigger=none}{code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showErrorDialog('Title', 'Value not allowed','OK');
{code}{sub-section}{div{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showInfoDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]){span}{td}{tr}{tr:classid=lastDetailRowdes}{td}{td}{tr}{tbody}{tbody:id=showInfoDialog|class=nodeShows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tr:id=namesnc}{td}h6.showInfoDialog*Since*\\ Replace with version info{td}{tr}{tr:id=sigprs}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showInfoDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]){span*Parameters*\\dialog_title
msg
\[...button\]
{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=deslink}{td}{sub-section:showInfoDialog_des|text=|trigger=button}{sub-section}{sub-section:showInfoDialog_des|trigger=none|class=sIndent}Shows a message dialog with the specified title, message and a customizable set of buttons.{sub-section*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showInfoDialog('Title', 'Value not allowed','OK');
{code}{div}{td}{tr}{builder-showtr:permission=editclass=lastDetailRow}{td}{td}{tr:id=snc}{tdtbody}*Since*\\{sub-section:showInfoDialog_snc|text=|trigger=button}{sub-section}{sub-section:showInfoDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{tbody:id=showInputDialog|class=node}{tr:id=name}{td}h6.showInputDialog{td}{tr}{builder-show}{tr:id=prssig}{td}*Parameters*\\{sub-section:showInfoDialog_prs|text=|trigger=button}{sub-section}{sub-section:showInfoDialog_prs|trigger=none|class=sIndent}dialog_title
msg
\[...button\]
{sub-section{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showInputDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[initialValue\]){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\{sub-section:showInfoDialog_ret|text=|trigger=button}{sub-section}{sub-section:showInfoDialog_ret|trigger=none|class=sIndent}[String]{sub-section}Shows an input dialog where the user can enter data. Returns the entered data, or nothing when canceled.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:showInfoDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showInfoDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=editdialog_title
msg
\[initialValue\]
{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=linksee}{td}*ExternalAlso linkssee*\\{sub-section:showInfoDialog_link|text=|trigger=button}{sub-section}div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{sub-section:showInfoDialog_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showInfoDialog_sam|text=|trigger=button}{sub-section}{div:classdiv:class=sIndent}{sub-section:showInfoDialog_sam|trigger=none}{code:language=javascript}
//show input dialog ,returns nothing when canceled 
var thePressedButtontypedInput = plugins.dialogs.showInfoDialogshowInputDialog('TitleSpecify', 'Value not allowed','OK'Your name');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showInputDialogshowQuestionDialog|class=node}{tr:id=name}{td}h6.showInputDialogshowQuestionDialog{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showInputDialogshowQuestionDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[initialValue...button\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showInputDialog_des|text=|trigger=button}{sub-section}{sub-section:showInputDialog_des|trigger=none|class=sIndent}Shows ana inputmessage dialog wherewith the userspecified cantitle, entermessage data.and Returnsa thecustomizable enteredset data, or nothing when canceled.{sub-section}of buttons.{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showInputDialog_snc|text=|trigger=button}{sub-section}{sub-section:showInputDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiontd}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showInputDialog_prs|text=|trigger=button}{sub-section}{sub-section:showInputDialog_prs|trigger=none|class=sIndent}dialog_title
msg
\[initialValue...button\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showInputDialog_ret|text=|trigger=button}{sub-section}{sub-section:showInputDialog_ret|trigger=none|[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}[String]{sub-section{div}{td}{tr}{builder-show:permission=edit}{tr:id=seelink}{td}*AlsoExternal seelinks*\\{sub-section:showInputDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showInputDialog_see|trigger=none}{sub-sectiondiv:class=sIndent}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:showInputDialog_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showInputDialog_link|trigger=none}{sub-section}{div}div:class=sIndent}{code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showQuestionDialog('Title', 'Value not allowed','OK');
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showSelectDialog|class=node}{tr:id=name}{td}h6.showSelectDialog{td}{tr}{builder-show}{tr:id=samsig}{td}*Sample*\\{sub-section:showInputDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showInputDialog_sam|trigger=none}{code:language=javascript}
//show input dialog ,returns nothing when canceled 
var typedInput = plugins.dialogs.showInputDialog('Specify','Your name');
{code}{sub-section}{div}{{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showSelectDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, optionArray/option1, \[...option\]){span}{td}{tr}{tr:classid=lastDetailRowdes}{td}{td}{tr}{tbody}{tbody:id=showQuestionDialog|class=nodeShows a selection dialog, where the user can select an entry from a list of options. Returns the selected entry, or nothing when canceled.{td}{tr}{tr:id=namesnc}{td}h6.showQuestionDialog*Since*\\ Replace with version info{td}{tr}{tr:id=sigprs}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showQuestionDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]){span*Parameters*\\dialog_title
msg
optionArray/option1
\[...option\]
{td}{tr}{tr:id=ret}{td}*Returns*\\[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=deslink}{td}{sub-section:showQuestionDialog_des|text=|trigger=button}{sub-section}{sub-section:showQuestionDialog_des|trigger=none|class=sIndent}Shows a message dialog with the specified title, message and a customizable set of buttons.{sub-section*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//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'));
{code}{div}{td}{tr}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=snctd}{td}*Since*\\{sub-section:showQuestionDialog_snc|text=|trigger=button}{sub-section}{sub-section:showQuestionDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show{tr}{tbody}{tbody:id=showWarningDialog|class=node}{tr:id=name}{td}h6.showWarningDialog{td}{tr}{tr:id=prssig}{td}*Parameters*\\{sub-section:showQuestionDialog_prs|text=|trigger=button}{sub-section}{sub-section:showQuestionDialog_prs|trigger=none|class=sIndent}dialog_title
msg
\{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showWarningDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]
){sub-sectionspan}{td}{tr}{tr:id=retdes}{td}*Returns*\\{sub-section:showQuestionDialog_ret|text=|trigger=button}{sub-section}{sub-section:showQuestionDialog_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showQuestionDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showQuestionDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showQuestionDialog_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showQuestionDialog_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showQuestionDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showQuestionDialog_sam|trigger=none}{code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showQuestionDialog('Title', 'Value not allowed','OK');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showSelectDialog|class=node}{tr:id=name}{td}h6.showSelectDialog{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showSelectDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, optionArray/option1, \[...option\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showSelectDialog_des|text=|trigger=button}{sub-section}{sub-section:showSelectDialog_des|trigger=none|class=sIndent}Shows a selection dialog, where the user can select an entry from a list of options. Returns the selected entry, or nothing when canceled.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showSelectDialog_snc|text=|trigger=button}{sub-section}{sub-section:showSelectDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showSelectDialog_prs|text=|trigger=button}{sub-section}{sub-section:showSelectDialog_prs|trigger=none|class=sIndent}dialog_title
msg
optionArray/option1
\[...option\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:showSelectDialog_ret|text=|trigger=button}{sub-section}{sub-section:showSelectDialog_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:showSelectDialog_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showSelectDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showSelectDialog_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showSelectDialog_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showSelectDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showSelectDialog_sam|trigger=none}{code:language=javascript}
//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'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=showWarningDialog|class=node}{tr:id=name}{td}h6.showWarningDialog{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}showWarningDialog{span}{span:id=iets|style=float: left;}\(dialog_title, msg, \[...button\]){span}{td}{tr}{tr:id=des}{td}{sub-section:showWarningDialog_des|text=|trigger=button}{sub-section}{sub-section:showWarningDialog_des|trigger=none|class=sIndent}Shows a message dialog with the specified title, message and a customizable set of buttons.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:showWarningDialog_snc|text=|trigger=button}{sub-section}{sub-section:showWarningDialog_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:showWarningDialog_prs|text=|trigger=button}{sub-section}{sub-section:showWarningDialog_prs|trigger=none|class=sIndent}dialog_title
msg
\[...button\]
{sub-section}Shows a message dialog with the specified title, message and a customizable set of buttons.{td}{tr}{tr:id=retsnc}{td}*ReturnsSince*\\{sub-section:showWarningDialog_ret|text=|trigger=button}{sub-section}{sub-section:showWarningDialog_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\dialog_title
msg
\[...button\]
{td}{tr}{tr:id=seeret}{td}*Also seeReturns*\\{sub-section:showWarningDialog_see|text=|trigger=button}{sub-section}[String]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{sub-section:showWarningDialog_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:showWarningDialog_link|text=|trigger=button}{sub-section}*\\{div:class=sIndent}{sub-section:showWarningDialog_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:showWarningDialog_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:showWarningDialog_sam|trigger=none}{code:language=javascript}
//show dialog
var thePressedButton = plugins.dialogs.showWarningDialog('Title', 'Value not allowed','OK');
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}