Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
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


HTML Table
classservoy sReturnTypes
Table Row (tr)
styleheight: 30px;
Table Head (th)
Return Types
Table Row (tr)
Table Cell (td)
Span
classsWordList
CheckBox
Span
classsWordList
Menu
Span
classsWordList
MenuBar
Span
classsWordList
MenuItem
Span
classsWordList
Popup
Span
classsWordList
RadioButton
Span
classsWordList
ToolBar

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
ToolBar
Table Cell (td)
#addToolBar(name, [displayname], [row])
Add a toolbar by name and optional displayname and row.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Popup
Table Cell (td)
#createPopupMenu()
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#createShortcut(shortcut, method, [form_name])
Create a shortcut.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
MenuBar
Table Cell (td)
#getMenuBar([windowName])
Get the menubar of a window.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
ToolBar
Table Cell (td)
#getToolBar(name)
Get the toolbar from the toolbar panel by name.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String[]
Table Cell (td)
#getToolbarNames()
Get all toolbar names from the toolbar panel.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#maximize([windowName])
Maximize the current window or the window with the name provided (Smart client only)
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#removeShortcut(shortcut, [form_name])
Remove a shortcut.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#removeToolBar(name)
Remove the toolbar from the toolbar panel.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setFullScreen()
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setStatusBarVisible()
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#setToolBarAreaVisible()

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idaddToolBar
classnode
Table Row (tr)
idname
Table Cell (td)
addToolBar
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
ToolBar
Span
stylefloat: left; font-weight: bold;
idiets
addToolBar
Span
stylefloat: left;
idiets
(name, [displayname], [row])
Table Row (tr)
iddes
Table Cell (td)
Add a toolbar by name and optional displayname and row.
Table Row (tr)
idprs
Table Cell (td)
Parameters
name
[displayname]
[row]
Table Row (tr)
idret
Table Cell (td)
Returns
ToolBar
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Note: method addToolBar only works in the smart client.

// Add a toolbar by name and optional displayname and row.
// add a toolbar with only a name
var toolbar = plugins.window.addToolBar("toolbar_0");

// add a toolbar with a name and internal name
// var toolbar = plugins.window.addToolBar("toolbar_1", "toolbar_1");

// add a toolbar with a name, internal name and the row you want the
// toolbar to show at. rownumber starts at 0 
// var toolbar = plugins.window.addToolBar("toolbar_2", "toolbar_2", 3);

// REMARK: normally you would add buttons, checkboxes etc in the same method
// this example will show no buttons for now!
// we will add them via the other methods on this form.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreatePopupMenu
classnode
Table Row (tr)
idname
Table Cell (td)
createPopupMenu
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Popup
Span
stylefloat: left; font-weight: bold;
idiets
createPopupMenu
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
Popup
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
var popupmenu = plugins.window.createPopupMenu()

var menuitem1 = popupmenu.addMenuItem('A',myMethod)
var menuitem2 = popupmenu.addRadioButton('B',myMethod)
var menuitem3 = popupmenu.addRadioButton('C',myMethod)
var menuitem4 = popupmenu.addSeparator()
var menuitem5 = popupmenu.addMenuItem('<html><b>Hello</b></html>',myMethod)
var menuitem6 = popupmenu.addMenuItem('G', globals.myGlobalMethod)
//add arguments to the method call
menuitem6.methodArguments = ['arg1', 'another argument']

var submenu = popupmenu.addMenu('SubMenu')
var subitem1 = submenu.addCheckBox('i18n:bla_bla',myMethod)
var subitem2 = submenu.addCheckBox('he' , globals.myOtherGlobalMethod , 'media:///day_obj.gif')
var subitem3 = submenu.addCheckBox('more' , globals.myOtherGlobalMethod ,null, 'm') //last parameter is mnemonic-key

menuitem2.selected = true;
menuitem6.enabled = false
subitem2.selected = true;

var source = event.getSource()
if (source != null)
{
	popupmenu.show(source);
	//or you can set the coordinates popupmenu.show(10, 10);
}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcreateShortcut
classnode
Table Row (tr)
idname
Table Cell (td)
createShortcut
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
createShortcut
Span
stylefloat: left;
idiets
(shortcut, method, [form_name])
Table Row (tr)
iddes
Table Cell (td)
Create a shortcut.
Table Row (tr)
idprs
Table Cell (td)
Parameters
shortcut
method
[form_name]
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Create a shortcut.
// this plugin uses the java keystroke parser
// see http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/KeyStroke.html#getKeyStroke(java.lang.String)

// global shortcut (on all forms) on  'apple 1' on a mac client and 'control 1' on other client platforms
plugins.window.createShortcut('menu 1', 'globals.handleShortcut');
// global handler, only triggered when on form frm_orders
plugins.window.createShortcut('control shift I', globals.handleOrdersShortcut, 'frm_orders');
// form method called when shortcut is used
plugins.window.createShortcut('control LEFT', 'frm_products.handleShortcut', 'frm_products');
// same, but use method in stead of string
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, 'frm_contacts');

// remove global shortcut and form-level shortcut
plugins.window.createShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');

// shortcut handlers are called with an jsevent argument
///**
//* Handle keyboard shortcut.
//*
//* @param {JSEvent} event the event that triggered the action
//*/
//function handleShortcut(event)
//{
//  application.output(event.getType()) // returns 'menu 1'
//  application.output(event.getFormName()) // returns 'frm_contacts'
//  application.output(event.getElementName()) // returns 'contact_name_field' or null when no element is selected
//}

// NOTE: shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts careful to make sure they work in all clients.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetMenuBar
classnode
Table Row (tr)
idname
Table Cell (td)
getMenuBar
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
MenuBar
Span
stylefloat: left; font-weight: bold;
idiets
getMenuBar
Span
stylefloat: left;
idiets
([windowName])
Table Row (tr)
iddes
Table Cell (td)
Get the menubar of a window.
Table Row (tr)
idprs
Table Cell (td)
Parameters
[windowName]
Table Row (tr)
idret
Table Cell (td)
Returns
MenuBar
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Get the menubar of a window.
// get the menubar of the main window
var mainMenubar = plugins.window.getMenuBar();

// get the menubar of a named window
application.showFormInWindow(forms.contacts,100,80,500,300,'my own window title',false,true,'mywindow');
var myWindowMenubar = plugins.window.getMenuBar('mywindow');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetToolBar
classnode
Table Row (tr)
idname
Table Cell (td)
getToolBar
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
ToolBar
Span
stylefloat: left; font-weight: bold;
idiets
getToolBar
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Get the toolbar from the toolbar panel by name.
Table Row (tr)
idprs
Table Cell (td)
Parameters
name
Table Row (tr)
idret
Table Cell (td)
Returns
ToolBar
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Note: method getToolBar only works in the smart client.

// Get the toolbar from the toolbar panel by name.
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");

// add a button with a text and a method
toolbar.addButton("button", feedback_button);

// add an input array to the button for feedback in the selected method
toolbar.addButton("button", feedback_button, [1, "2", "three"]);

// add an icon to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif");

// add a tooltip to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.");

// show only an icon on the button and disable the button
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.", false);

// add a separator
toolbar.addSeparator();

// make the button non visible
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.",true, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetToolbarNames
classnode
Table Row (tr)
idname
Table Cell (td)
getToolbarNames
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String[]
Span
stylefloat: left; font-weight: bold;
idiets
getToolbarNames
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Get all toolbar names from the toolbar panel.
Table Row (tr)
idret
Table Cell (td)
Returns
String[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Note: method getToolbarNames only works in the smart client.

// Get all toolbar names from the toolbar panel.
// create an array of toolbar names
var names = plugins.window.getToolbarNames();

// create an empty message variable
var message = "";

// loop through the array
for (var i = 0 ; i < names.length ; i++) {
	//add the name(s) to the message
	message += names[i] + "\n";
}

// show the message
plugins.dialogs.showInfoDialog("toolbar names", message);
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmaximize
classnode
Table Row (tr)
idname
Table Cell (td)
maximize
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
maximize
Span
stylefloat: left;
idiets
([windowName])
Table Row (tr)
iddes
Table Cell (td)
Maximize the current window or the window with the name provided (Smart client only)
Table Row (tr)
idprs
Table Cell (td)
Parameters
[windowName]
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Maximize the current window or the window with the name provided (Smart client only)
// maximize the main window:
plugins.window.maximize();
// or a window constructed with the name 'test':
plugins.window.maximize('test');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveShortcut
classnode
Table Row (tr)
idname
Table Cell (td)
removeShortcut
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
removeShortcut
Span
stylefloat: left;
idiets
(shortcut, [form_name])
Table Row (tr)
iddes
Table Cell (td)
Remove a shortcut.
Table Row (tr)
idprs
Table Cell (td)
Parameters
shortcut
[form_name]
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Remove a shortcut.
// this plugin uses the java keystroke parser
// see http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/KeyStroke.html#getKeyStroke(java.lang.String)

// global shortcut (on all forms) on  'apple 1' on a mac client and 'control 1' on other client platforms
plugins.window.createShortcut('menu 1', 'globals.handleShortcut');
// global handler, only triggered when on form frm_orders
plugins.window.createShortcut('control shift I', globals.handleOrdersShortcut, 'frm_orders');
// form method called when shortcut is used
plugins.window.createShortcut('control LEFT', 'frm_products.handleShortcut', 'frm_products');
// same, but use method in stead of string
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, 'frm_contacts');

// remove global shortcut and form-level shortcut
plugins.window.createShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');

// shortcut handlers are called with an jsevent argument
///**
//* Handle keyboard shortcut.
//*
//* @param {JSEvent} event the event that triggered the action
//*/
//function handleShortcut(event)
//{
//  application.output(event.getType()) // returns 'menu 1'
//  application.output(event.getFormName()) // returns 'frm_contacts'
//  application.output(event.getElementName()) // returns 'contact_name_field' or null when no element is selected
//}

// NOTE: shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts careful to make sure they work in all clients.
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idremoveToolBar
classnode
Table Row (tr)
idname
Table Cell (td)
removeToolBar
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
removeToolBar
Span
stylefloat: left;
idiets
(name)
Table Row (tr)
iddes
Table Cell (td)
Remove the toolbar from the toolbar panel.
Table Row (tr)
idprs
Table Cell (td)
Parameters
name
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
// Note: method removeToolBar only works in the smart client.

// Remove the toolbar from the toolbar panel.
// removing a toolbar from the toolbar panel is done by name
// the plugin checks the existence of the toolbar
// when the toolbar does not exist it will not throw an error though.
plugins.window.removeToolBar("toolbar_0");
plugins.window.removeToolBar("toolbar_1");
plugins.window.removeToolBar("toolbar_2");
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetFullScreen
classnode
Table Row (tr)
idname
Table Cell (td)
setFullScreen
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setFullScreen
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.window.setFullScreen(true)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetStatusBarVisible
classnode
Table Row (tr)
idname
Table Cell (td)
setStatusBarVisible
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setStatusBarVisible
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.window.setStatusBarVisible()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsetToolBarAreaVisible
classnode
Table Row (tr)
idname
Table Cell (td)
setToolBarAreaVisible
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
setToolBarAreaVisible
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Replace with description
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
plugins.window.setToolBarAreaVisible(false)
Table Row (tr)
classlastDetailRow
Table Cell (td)