window

Return Types

Menu,RadioButton,CheckBox,FormPopup,MenuItem,Popup,ToolBar,MenuBar,

Methods Summary

Methods Details

cancelFormPopup()

Close the current form popup panel without assigning a value to the configured data provider.

Returns void

Sample

// 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

closeFormPopup(retval)

Close the current form popup panel and assign the value to the configured data provider.

Parameters Object retval return value for data provider

Returns void

Sample

// 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

createFormPopup(form)

Create a form popup that can be filled with data and shown.

Parameters Object form the form to show

Returns FormPopup FormPopup

Sample

plugins.window.createFormPopup(forms.orderPicker).show();

createPopupMenu()

Creates a new popup menu that can be populated with items and displayed.

Returns Popup

Sample

// 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);
}

createShortcut(shortcut, methodName)

Create a shortcut.

Parameters String shortcut ; String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, methodName, arguments)

Create a shortcut.

Parameters String shortcut ; String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute Array arguments ;

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, methodName, contextFilter)

Create a shortcut.

Parameters String shortcut ; String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method, contextFilter, arguments)

Create a shortcut.

Parameters String shortcut ; Object method the method/function that needs to be called when the shortcut is hit String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element Array arguments ;

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, methodName, contextFilter, arguments, consumeEvent)

Create a shortcut.

Parameters String shortcut ; String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element Array arguments ; Boolean consumeEvent if true then the shotcut will consume the event and the default browser behavior will not be executed (default false)

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method)

Create a shortcut.

Parameters String shortcut ; Function method the method/function that needs to be called when the shortcut is hit

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method, arguments)

Create a shortcut.

Parameters String shortcut ; Function method the method/function that needs to be called when the shortcut is hit Array arguments ;

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method, contextFilter)

Create a shortcut.

Parameters String shortcut ; Function method the method/function that needs to be called when the shortcut is hit String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method, contextFilter, arguments)

Create a shortcut.

Parameters String shortcut ; Function method the method/function that needs to be called when the shortcut is hit String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element Array arguments ;

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

createShortcut(shortcut, method, contextFilter, arguments, consumeEvent)

Create a shortcut.

Parameters String shortcut ; Function method the method/function that needs to be called when the shortcut is hit String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element Array arguments ; Boolean consumeEvent if true then the shotcut will consume the event and the default browser behavior will not be executed (default false)

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

removeShortcut(shortcut)

Remove a shortcut.

Parameters String shortcut ;

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

removeShortcut(shortcut, contextFilter)

Remove a shortcut.

Parameters String shortcut ; String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element

Returns Boolean

Sample

// 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));
// Num Lock and Substract shortcuts
plugins.window.createShortcut("NUMPAD8", handleMyShortcut);
plugins.window.createShortcut("SUBTRACT", handleMyShortcut);
// remove global shortcut and form-level shortcut
plugins.window.removeShortcut('menu 1');
plugins.window.removeShortcut('control RIGHT', 'frm_contacts');
// consuming they keystroke so that a default browser event will not happen
plugins.window.createShortcut('F4', scopes.globals.handleOrdersShortcut, 'frm_contacts', null, true);
// 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
//}
// NOTES:
// 1) shortcuts will not override existing operating system or browser shortcuts,
// choose your shortcuts carefully to make sure they work in all clients.
// 2) always use lower-case letters for modifiers (shift, control, etc.), otherwise createShortcut will fail.

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object form the form to show Object scope the scope to put retval into String dataproviderID the dataprovider of scope to fill

Returns void

Sample

// 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

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID, width, height)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object 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

Returns void

Sample

// 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

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID, width, height, x, y)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. Can show relative to a component or at specified coordinates. Show on specified location is only supported in NGClient.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object 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 Number x popup x location Number y popup y location

Returns void

Sample

// 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");
// plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id",-1,-1,100,100);
// do call closeFormPopup(ordervalue) from the orderPicker form

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID, width, height, x, y, showBackdrop)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. Can show relative to a component or at specified coordinates. Show on specified location and backdrop is only supported in NGClient.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object 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 Number x popup x location Number y popup y location Boolean showBackdrop whatever to show a dimmed backdrop under the popup

Returns void

Sample

// 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");
// plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id",-1,-1,100,100,true);
// do call closeFormPopup(ordervalue) from the orderPicker form

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID, width, height, x, y, showBackdrop, doNotCloseOnClickOutside)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. Can show relative to a component or at specified coordinates. Show on specified location and backdrop is only supported in NGClient. By setting the @param doNotCloseOnClickOutside as true, one can ensure that the popup will not be closed when clicking outside this popup.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object 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 Number x popup x location Number y popup y location Boolean showBackdrop whatever to show a dimmed backdrop under the popup Boolean doNotCloseOnClickOutside whether to close on not close the popup on clicking outside

Returns void

Sample

// 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");
// plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id",-1,-1,100,100,true, true);
// do call closeFormPopup(ordervalue) from the orderPicker form

showFormPopup(elementToShowRelatedTo, form, scope, dataproviderID, width, height, x, y, showBackdrop, doNotCloseOnClickOutside, onClose)

Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope. Can show relative to a component or at specified coordinates. Show on specified location and backdrop is only supported in NGClient.

Parameters Object elementToShowRelatedTo element to show related to or null to center in screen Object 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 Number x popup x location Number y popup y location Boolean showBackdrop whatever to show a dimmed backdrop under the popup Boolean doNotCloseOnClickOutside whether to close on not close the popup on clicking outside Function onClose a callback function that is being triggered once the formpopup window is being closed

Returns void

Sample

// 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");
// plugins.window.showFormPopup(null,forms.orderPicker,foundset.getSelectedRecord(),"order_id",-1,-1,100,100,true, false, onClose);
//
// function onClose(event) {application.output("Popup closed");}

Last updated