Show a form as popup panel, where the closeFormPopup can pass return a value to a dataprovider in the specified scope.
Methods Detailed
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.
// 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);}
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
StringdataproviderID 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.
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.
Parameters
ObjectelementToShowRelatedTo element to show related to or null to center in screen
// 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
ObjectelementToShowRelatedTo element to show related to or null to center in screen
BooleanshowBackdrop 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
ObjectelementToShowRelatedTo element to show related to or null to center in screen
BooleanshowBackdrop whatever to show a dimmed backdrop under the popup
BooleandoNotCloseOnClickOutside 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.
Parameters
ObjectelementToShowRelatedTo element to show related to or null to center in screen
BooleanshowBackdrop whatever to show a dimmed backdrop under the popup
BooleandoNotCloseOnClickOutside whether to close on not close the popup on clicking outside
FunctiononClose 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");}