Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
id | addToolBar-JSWindow_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates and returns a toolbar for a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {JSWindow} window {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar(win,"toolbar_0");
toolbar0.addButton("click me 0", callback_function);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar(win,"toolbar_1", 2);
toolbar1.addButton("click me 1", callback_function);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar(win,"toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", callback_function);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar(win,"toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", callback_function);
win.show(forms.Myform) |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-JSWindow_String_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates and returns a toolbar for a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {JSWindow} window {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. {Number} row - the row inside the toolbar panel where this toolbar is to be added. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar(win,"toolbar_0");
toolbar0.addButton("click me 0", callback_function);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar(win,"toolbar_1", 2);
toolbar1.addButton("click me 1", callback_function);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar(win,"toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", callback_function);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar(win,"toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", callback_function);
win.show(forms.Myform) |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-JSWindow_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(window, name, displayname) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates and returns a toolbar for a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {JSWindow} window {String} name - the name by which this toolbar is identified in code {String} displayname - the name by which this toolbar will be identified in the UI. (for example in the toolbar panel's context menu) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar(win,"toolbar_0");
toolbar0.addButton("click me 0", callback_function);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar(win,"toolbar_1", 2);
toolbar1.addButton("click me 1", callback_function);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar(win,"toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", callback_function);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar(win,"toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", callback_function);
win.show(forms.Myform) |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-JSWindow_String_String_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(window, name, displayname, row) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates and returns a toolbar for a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {JSWindow} window {String} name - the name by which this toolbar is identified in code. {String} displayname - the name by which this toolbar will be identified in the UI. (for example in the toolbar panel's context menu) {Number} row - the row inside the toolbar panel where this toolbar is to be added. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar(win,"toolbar_0");
toolbar0.addButton("click me 0", callback_function);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar(win,"toolbar_1", 2);
toolbar1.addButton("click me 1", callback_function);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar(win,"toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", callback_function);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar(win,"toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", callback_function);
win.show(forms.Myform) |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar("toolbar_0");
toolbar0.addButton("click me 0", feedback_button);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar("toolbar_1", 2);
toolbar1.addButton("click me 1", feedback_button);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar("toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", feedback_button);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar("toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", feedback_button); |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-String_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. {Number} row - the row inside the toolbar panel where this toolbar is to be added. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar("toolbar_0");
toolbar0.addButton("click me 0", feedback_button);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar("toolbar_1", 2);
toolbar1.addButton("click me 1", feedback_button);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar("toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", feedback_button);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar("toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", feedback_button); |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. {String} displayname - the name by which this toolbar will be identified in the UI. (for example in the toolbar panel's context menu) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar("toolbar_0");
toolbar0.addButton("click me 0", feedback_button);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar("toolbar_1", 2);
toolbar1.addButton("click me 1", feedback_button);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar("toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", feedback_button);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar("toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", feedback_button); |
|
|
|
|
Table Body (tbody) |
---|
id | addToolBar-String_String_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(name, displayname, row) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} name - the name by which this toolbar is identified in code. If display name is missing, name will be used as displayName as well. {String} displayname - the name by which this toolbar will be identified in the UI. (for example in the toolbar panel's context menu) {Number} row - the row inside the toolbar panel where this toolbar is to be added. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method addToolBar only works in the smart client.
// add a toolbar with only a name
var toolbar0 = plugins.window.addToolBar("toolbar_0");
toolbar0.addButton("click me 0", feedback_button);
// add a toolbar with a name and the row you want it to show at
// row number starts at 0
var toolbar1 = plugins.window.addToolBar("toolbar_1", 2);
toolbar1.addButton("click me 1", feedback_button);
// add a toolbar with a name and display name
var toolbar2 = plugins.window.addToolBar("toolbar_2", "toolbar_2_internal_name");
toolbar2.addButton("click me 2", feedback_button);
// add a toolbar with a name, display name and the row you want the
// toolbar to show at. row number starts at 0
var toolbar3 = plugins.window.addToolBar("toolbar_3", "toolbar_3_internal_name", 3);
toolbar3.addButton("click me 3", feedback_button); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Close the current form popup panel without assigning a value to the configured data provider. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id");
// do call closeFormPopup(ordervalue) from the orderPicker form |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Close the current form popup panel and assign the value to the configured data provider. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object} retval - return value for data provider |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id");
// do call closeFormPopup(ordervalue) from the orderPicker form |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Creates a new popup menu that can be populated with items and displayed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // create a popup menu
var menu = plugins.window.createPopupMenu();
// add a menu item
menu.addMenuItem("an entry", feedback);
if (event.getSource()) {
// display the popup over the component which is the source of the event
menu.show(event.getSource());
// display the popup over the components, at specified coordinates relative to the component
//menu.show(event.getSource(), 10, 10);
// display the popup at specified coordinates relative to the main window
//menu.show(100, 100);
} |
|
|
|
|
Table Body (tbody) |
---|
id | createShortcut-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, methodName) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {String} methodName - scopes.scopename.methodname or formname.methodname String to target the method to execute |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_String_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, methodName, arguments) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {String} methodName - scopes.scopename.methodname or formname.methodname String to target the method to execute {Object[]} arguments |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, methodName, contextFilter) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {String} methodName - scopes.scopename.methodname or formname.methodname String to target the method to execute {String} contextFilter - only triggers the shortcut when on this form |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_String_String_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, methodName, contextFilter, arguments) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {String} methodName - scopes.scopename.methodname or formname.methodname String to target the method to execute {String} contextFilter - only triggers the shortcut when on this form {Object[]} arguments |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_Function |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {Function} method - the method/function that needs to be called when the shortcut is hit |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_Function_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, method, arguments) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {Function} method - the method/function that needs to be called when the shortcut is hit {Object[]} arguments |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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) |
|
|
|
|
shortcut (on all forms) on 'apple 1' on a mac client and 'control 1' on other client platforms
handler
plugins.window.createShortcut(' |
|
|
|
| menu1'handleShortcut'handleOrdersShortcut);
// global handler |
|
|
|
| ,onlytriggeredwhenonformfrm_orders
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_ |
|
|
|
| orderscontacts');
// form method called when shortcut is used
plugins.window.createShortcut('control |
|
|
|
| LEFT'products.handleShortcut', 'frm_products'contacts.handleMyShortcut);
// |
|
|
|
| same, but use method in stead of string form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, |
|
|
|
| 'frm_contacts'new Array(argument1, argument2)); |
|
|
|
|
remove global shortcut and form-level shortcut
Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut(' |
|
|
|
| menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2)); |
|
|
|
|
shortcuthandlersarecalledwithanjseventargument
///**
//* 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.the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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. |
|
|
|
|
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=F6E073C8-E104-4A3D-AC44-934DC2735EF4}{tr:id=name}{td}h6.removeToolBar{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeToolBar{span}{span:id=iets|style=float: left;}\(name){span}{td}{tr}{tr:id=des}{td}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_des|text=|trigger=button}{sub-section}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_des|trigger=none|class=sIndent}Remove the toolbar from the toolbar panel.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_prs|trigger=none}name
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_ret|text=|trigger=button}{sub-section}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_see|text=|trigger=button}{sub-section}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_see|text=|trigger=button}{sub-section}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_sam|text=|trigger=button}{sub-section}{sub-section:F6E073C8-E104-4A3D-AC44-934DC2735EF4_sam|class=sIndent|trigger=none}{code:language=javascript}
// 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");
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=04CC4BB2-8522-4546-9DBC-39BC8EA02235}{tr:id=name}{td}h6.resetMenuBar{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}resetMenuBar{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_des|text=|trigger=button}{sub-section}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_des|trigger=none|class=sIndent}Reset the menubar to the default.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_ret|text=|trigger=button}{sub-section}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_see|text=|trigger=button}{sub-section}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_see|text=|trigger=button}{sub-section}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_sam|text=|trigger=button}{sub-section}{sub-section:04CC4BB2-8522-4546-9DBC-39BC8EA02235_sam|class=sIndent|trigger=none}{code:language=javascript}
// Note: method resetMenuBar only works in the smart client.
// Reset the menubar to the default.
// When the menubar settings are solution specific it is advised to reset
// the bar to its default settings when closing the solution.
// Another reason is that when a client/developer is started first the
// plugin will save the current settings in memory
// REMARK: Don't manipulate standard Servoy menuitems but remove
// them and create new ones! Due to the way menuitems are managed by java it is not
// possible to reset a menuitem anymore.
plugins.window.resetMenuBar();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD}{tr:id=name}{td}h6.setFullScreen{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setFullScreen{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_des|text=|trigger=button}{sub-section}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_ret|text=|trigger=button}{sub-section}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_see|text=|trigger=button}{sub-section}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_see|text=|trigger=button}{sub-section}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_sam|text=|trigger=button}{sub-section}{sub-section:37BB0D88-8EBF-4FF4-82B9-71EF18A66ACD_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.window.setFullScreen(true)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=EBCDF2E1-132D-445C-B6C6-E0E4CC407261}{tr:id=name}{td}h6.setMenuVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setMenuVisible{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_des|text=|trigger=button}{sub-section}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_ret|text=|trigger=button}{sub-section}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_see|text=|trigger=button}{sub-section}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_see|text=|trigger=button}{sub-section}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_sam|text=|trigger=button}{sub-section}{sub-section:EBCDF2E1-132D-445C-B6C6-E0E4CC407261_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.window.setMenuVisible(false)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149}{tr:id=name}{td}h6.setStatusBarVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setStatusBarVisible{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_des|text=|trigger=button}{sub-section}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_ret|text=|trigger=button}{sub-section}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_see|text=|trigger=button}{sub-section}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_see|text=|trigger=button}{sub-section}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_sam|text=|trigger=button}{sub-section}{sub-section:958FE4E7-D3D7-4C5B-BE80-F32DE4AE5149_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.window.setStatusBarVisible()
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=11B1917A-70ED-4D4C-8A03-C57D32D53283}{tr:id=name}{td}h6.setToolBarVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setToolBarVisible{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_des|text=|trigger=button}{sub-section}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_ret|text=|trigger=button}{sub-section}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_see|text=|trigger=button}{sub-section}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_see|text=|trigger=button}{sub-section}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_sam|text=|trigger=button}{sub-section}{sub-section:11B1917A-70ED-4D4C-8A03-C57D32D53283_sam|class=sIndent|trigger=none}{code:language=javascript}
plugins.window.setToolBarVisible(false)
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=118EB79B-10F9-454A-B736-1ECD24AAE7B3}{tr:id=name}{td}h6.validateMenuBar{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}validateMenuBar{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_des|text=|trigger=button}{sub-section}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_des|trigger=none|class=sIndent}Use this when your add/remove/edit operation won't refresh.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_ret|text=|trigger=button}{sub-section}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_see|text=|trigger=button}{sub-section}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_see|text=|trigger=button}{sub-section}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_sam|text=|trigger=button}{sub-section}{sub-section:118EB79B-10F9-454A-B736-1ECD24AAE7B3_sam|class=sIndent|trigger=none}{code:language=javascript}
// Note: method validateMenuBar only works in the smart client.
// Use this when your add/remove/edit operation won't refresh.
plugins.window.validateMenuBar();
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} Table Body (tbody) |
---|
id | createShortcut-String_Function_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, method, contextFilter) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {Function} method - the method/function that needs to be called when the shortcut is hit {String} contextFilter - only triggers the shortcut when on this form |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | createShortcut-String_Function_String_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
createShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, method, contextFilter, arguments) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {Function} method - the method/function that needs to be called when the shortcut is hit {String} contextFilter - only triggers the shortcut when on this form {Object[]} arguments |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the menubar of the main window, or of a named window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // create a new window
var win = application.createWindow("windowName", JSWindow.WINDOW);
// show a form in the new window
forms.my_form.controller.show(win);
// retrieve the menubar of the new window
var menubar = plugins.window.getMenuBar("windowName");
// add a new menu to the menubar, with an item in it
var menu = menubar.addMenu();
menu.text = "New Menu";
menu.addMenuItem("an entry", feedback);
// retrieve the menubar of the main window
var mainMenubar = plugins.window.getMenuBar();
// add a new menu to the menubar of the main window
var menuMain = mainMenubar.addMenu();
menuMain.text = "New Menu in Main Menubar";
menuMain.addMenuItem("another entry", feedback); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the menubar of the main window, or of a named window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} windowName - the name of the window |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // create a new window
var win = application.createWindow("windowName", JSWindow.WINDOW);
// show a form in the new window
forms.my_form.controller.show(win);
// retrieve the menubar of the new window
var menubar = plugins.window.getMenuBar("windowName");
// add a new menu to the menubar, with an item in it
var menu = menubar.addMenu();
menu.text = "New Menu";
menu.addMenuItem("an entry", feedback);
// retrieve the menubar of the main window
var mainMenubar = plugins.window.getMenuBar();
// add a new menu to the menubar of the main window
var menuMain = mainMenubar.addMenu();
menuMain.text = "New Menu in Main Menubar";
menuMain.addMenuItem("another entry", feedback); |
|
|
|
|
Table Body (tbody) |
---|
id | getToolBar-JSWindow_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the toolbar of a specific window from the toolbar panel by name. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method getToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// the toolbar must first be created with a call to addToolbar
plugins.window.addToolBar(win,"toolbar_0");
// show the empty toolbar and wait 4 seconds
win.show(forms.MyForm)
application.updateUI(4000)
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar(win,"toolbar_0");
// add a button to the toolbar
toolbar.addButton("button", callback_function); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get the toolbar from the toolbar panel by name. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method getToolBar only works in the smart client.
// the toolbar must first be created with a call to addToolbar
plugins.window.addToolBar("toolbar_0");
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");
// add a button to the toolbar
toolbar.addButton("button", feedback_button); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get all toolbar names from the toolbar panel. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method getToolbarNames only works in the smart client.
// 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 Body (tbody) |
---|
id | getToolbarNames-JSWindow |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Get all toolbar names from the toolbar panel of a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method getToolbarNames only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// the toolbar must first be created with a call to addToolbar
plugins.window.addToolBar(win,"toolbar_0");
plugins.window.addToolBar(win,"toolbar_1");
// create an array of toolbar names
var names = plugins.window.getToolbarNames(win);
// 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 Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Maximize the current window or the window with the specified name (Smart client only). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // maximize the main window:
plugins.window.maximize();
// create a new window
var win = application.createWindow("windowName", JSWindow.WINDOW);
// show a form in the new window
forms.my_form.controller.show(win);
// maximize the window
plugins.window.maximize("windowName"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Maximize the current window or the window with the specified name (Smart client only). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // maximize the main window:
plugins.window.maximize();
// create a new window
var win = application.createWindow("windowName", JSWindow.WINDOW);
// show a form in the new window
forms.my_form.controller.show(win);
// maximize the window
plugins.window.maximize("windowName"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
removeShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | removeShortcut-String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
removeShortcut |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(shortcut, contextFilter) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} shortcut {String} contextFilter - only triggers the shortcut when on this form |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 handler
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut);
// global handler with a form context filter
plugins.window.createShortcut('control shift I', scopes.globals.handleOrdersShortcut, 'frm_contacts');
// form method called when shortcut is used
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut);
// form method called when shortcut is used and arguments are passed to the method
plugins.window.createShortcut('control RIGHT', forms.frm_contacts.handleMyShortcut, new Array(argument1, argument2));
// Passing the method argument as a string prevents unnecessary form loading
//plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', new Array(argument1, argument2));
// Passing the method as a name and the contextFilter set so that this shortcut only trigger on the form 'frm_contacts'.
plugins.window.createShortcut('control RIGHT', 'frm_contacts.handleMyShortcut', 'frm_contacts', new Array(argument1, argument2));
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('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 Body (tbody) |
---|
id | removeToolBar-JSWindow_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Remove the toolbar from the toolbar panel of a specific window. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method removeToolBar only works in the smart client.
// create a window
var win = application.createWindow("myWindow", JSWindow.WINDOW);
// the toolbar must first be created with a call to addToolbar
var toolbar = plugins.window.addToolBar(win,"toolbar_0");
// add a button to the toolbar
toolbar.addButton("button", callcbackMethod);
// show the toolbar with the button and wait 4 seconds, then remove it
win.show(forms.MyForm)
application.updateUI(4000)
// 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(win,"toolbar_0"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Remove the toolbar from the toolbar panel. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Note: method removeToolBar only works in the smart client.
// the toolbar must first be created with a call to addToolbar
var toolbar = plugins.window.addToolBar("toolbar_0");
// add a button to the toolbar
toolbar.addButton("button", feedback_button);
// 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"); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setFullScreen |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Bring the window into/out of fullsceen mode. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // active fullscreen mode
plugins.window.setFullScreen(true); |
|
|
|
|
Table Body (tbody) |
---|
id | setStatusBarVisible-Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
setStatusBarVisible |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Show or hide the statusbar. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // hide the statusbar
plugins.window.setStatusBarVisible(false); |
|
|
|
|
Table Body (tbody) |
---|
id | setToolBarAreaVisible-Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| setToolBarAreaVisible |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Show or hide the toolbar area. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // hide the toolbar area
plugins.window.setToolBarAreaVisible(false); |
|
|
|
|
Table Body (tbody) |
---|
id | showFormPopup-RuntimeComponent_RuntimeForm_Object_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(elementToShowRelatedTo, form, scope, dataproviderID) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {RuntimeComponent} elementToShowRelatedTo - element to show related to or null to center in screen {RuntimeForm} form - the form to show {Object} scope - the scope to put retval into {String} dataproviderID - the dataprovider of scope to fill |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id");
// do call closeFormPopup(ordervalue) from the orderPicker form |
|
|
|
|
Table Body (tbody) |
---|
id | showFormPopup-RuntimeComponent_RuntimeForm_Object_String_Number_Number |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(elementToShowRelatedTo, form, scope, dataproviderID, width, height) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {RuntimeComponent} elementToShowRelatedTo - element to show related to or null to center in screen {RuntimeForm} form - the form to show {Object} scope - the scope to put retval into {String} dataproviderID - the dataprovider of scope to fill {Number} width - popup width {Number} height - popup height |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id");
// do call closeFormPopup(ordervalue) from the orderPicker form |
|
|
|
|
|