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.
ParametersObject 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.
// create a popup menuvar menu =plugins.window.createPopupMenu();// add a menu itemmenu.addMenuItem("an entry", feedback);if (event.getSource()) {// display the popup over the component which is the source of the eventmenu.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.
ParametersString shortcut ;
String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString shortcut ;
String methodName scopes.scopename.methodname or formname.methodname String to target the method to execute
Array arguments ;
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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 ;
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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)
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString shortcut ;
Function method the method/function that needs to be called when the shortcut is hit
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString shortcut ;
Function method the method/function that needs to be called when the shortcut is hit
Array arguments ;
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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 ;
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString 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)
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
ParametersString shortcut ;
String contextFilter form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element
// 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 handlerplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut);// global handler with a form context filterplugins.window.createShortcut('control shift I',scopes.globals.handleOrdersShortcut,'frm_contacts');// form method called when shortcut is usedplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut);// form method called when shortcut is used and arguments are passed to the methodplugins.window.createShortcut('control RIGHT',forms.frm_contacts.handleMyShortcut,newArray(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 shortcutsplugins.window.createShortcut("NUMPAD8", handleMyShortcut);plugins.window.createShortcut("SUBTRACT", handleMyShortcut);// remove global shortcut and form-level shortcutplugins.window.removeShortcut('menu 1');plugins.window.removeShortcut('control RIGHT','frm_contacts');// consuming they keystroke so that a default browser event will not happenplugins.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.
Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
ParametersObject 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
Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
ParametersObject 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
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.
ParametersObject 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.
ParametersObject 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.
ParametersObject 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
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.
ParametersObject 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");}