Window Plugin
Last updated
Was this helpful?
Last updated
Was this helpful?
(part of package '')
You can access it in code via: plugins.window
Close/cancels the current form popup panel without assigning a value to the configured data provider.
Example:
Close the current form popup panel and assign the value to the configured data provider.
Example:
Parameters:
Create a form popup that can be filled with data and shown.
Example:
Parameters:
Creates a new empty popup menu
Example:
Creates a new popup menu initialized from an existing JSMenu.
Example:
Parameters:
Create a shortcut.
Example:
Parameters:
It will return a FormPopup with the form passed as an argument or null.
Example:
Parameters:
@clonedesc js_removeShortcut(String) Example:
Parameters:
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.
Example:
Parameters:
scripting type: CustomType<window.CheckBox>
scripting type: CustomType<window.FormPopup>
Close/Cancel the current form and his children if applicable.
Example:
Returns the component.
Example:
Set component form popup will be shown relative to. If null, will use coordinates or show at screen center.
Example:
Parameters:
Create a form popup that can be filled with data and shown.
Example:
Parameters:
Returns the datprovider value
Example:
Set form popup dataprovider that will be set. If this is set, also scope needs to be specified.
Example:
Parameters:
Returns the height.
Example:
Set form popup height. If not set, form design height will be used.
Example:
Parameters:
Returns the onClose function value
Example:
Set the onclose function that is called when the closeFormPopup is called. This onClose will get a JSEvent as the first argument, and the return value that is given to the closeFormPopup(retvalue) call.
Example:
Parameters:
Returns the scope object
Example:
Set form popup scope that will be modified. If this is set, also dataprovider needs to be specified.
Example:
Parameters:
Show form popup using parameters that were set
Example:
Returns the backdrop value
Example:
Set whether backdrop will be shown. Default value is false.
Example:
Parameters:
Returns the width.
Example:
Set form popup width. If not set, form design width will be used.
Example:
Parameters:
Returns the x.
Example:
Set form popup x location. The priority sequence for location is: related element, set location, center of screen.
Example:
Parameters:
Returns the y value
Example:
Set form popup y location. The priority sequence for location is: related element, set location, center of screen.
Example:
Parameters:
Represents a Menu component. Extends BaseMenu to provide a popup menu with display text and basic actions. scripting type: CustomType<window.Menu>
text
The text label displayed for the menu.
Script the selection (emulate a mouse click) of the menu.
Example:
Set the the selected menu enabled or disabled.
Example:
Parameters:
Set the icon of the menu.
Example:
Parameters:
Set the mnemonic of the selected menu.
Example:
Parameters:
MenuItem type defines public properties and server-side API for menu items. scripting type: CustomType<window.MenuItem>
enabled
Indicates whether the menu item is enabled.
Default Value: true
methodArguments
An array of arguments to pass to the callback when the menu item is activated.
name
The unique name for the menu item.
selected
Indicates whether the menu item is selected.
text
The display text shown for the menu item.
Script the selection (emulate a mouse click) of the item.
Example:
Gets the specified client property for the menu item/checkbox/radiobutton based on a key.
Example:
Parameters:
Sets the value for the specified client property key of the menu item/checkbox/radiobutton.
Example:
Parameters:
Set the accelerator key of the menu item/checkbox/radiobutton.
Example:
Parameters:
Set the background color of the menu item/checkbox/radiobutton.Parameters:
Set the foreground color of the menu item/checkbox/radiobutton.Parameters:
Set the icon of the menu item/checkbox/radiobutton.
Example:
Parameters:
Set the method for the menu item/checkbox/radiobutton.
Example:
Parameters:
Set the icon of the menu item/checkbox/radiobutton.
Example:
Parameters:
Set the item visible.
Example:
Parameters:
Popup type defines public properties and server-side API for popup menus. scripting type: CustomType<window.Popup>
cssClass
CSS class for custom styling of the popup.
Show the popup menu relative to the specified component. If there is not enough space above or under the component, the behavior is undefined (the browser will decide how menu is displayed)
Example:
Parameters:
Show the popup menu at the specified location. If positionTop is true, and there is enough room available, then popup menu's bottom - left corner is ending at the specified coordinates; x, y values are relative to top-left corner of the component. By default, positionTop is false. If there is not enough space above or under the component, the behavior is undefined (the browser will decide how menu is displayed)
Example:
Parameters:
Show the popup menu relative to the event's source
Example:
Parameters:
Show the popup menu at the specified location
Example:
Parameters:
scripting type: CustomType<window.RadioButton>
{} retval Return value for data provider
{} form The form to show
Returns: A FormPopup instance that can be populated with data and displayed.
Returns: A new popup menu instance, optionally initialized with the provided JSMenu structure and callback function.
{} menu The JSMenu whose structure will be used to initialize the popup menu.
{} callback The menu item click handler that will be set on all popup menu items. The callback signature is: function(itemIndex:number, parentIndex: number, isSelected: boolean, parentMenu: String, menu: String)
Returns: A new popup menu instance, optionally initialized with the provided JSMenu structure and callback function.
{} shortcut The keyboard shortcut combination (e.g., 'control shift I', 'F4', 'NUMPAD8') to trigger the action.
{} callback Scopes.scopename.methodname or formname.methodname String to target the method to execute
{} [contextFilter] Form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element
{} [arguments] An optional array of arguments to pass to the method when the shortcut is executed.
{} [consumeEvent] If true then the shotcut will consume the event and the default browser behavior will not be executed (default false)
Returns: True if the shortcut was successfully created; otherwise, false.
{} form The form instance to be used in the popup.
Returns: A FormPopup instance containing the specified form, or null if the popup could not be created.
{} shortcut The keyboard shortcut combination to be removed.
{} [contextFilter] Form or element name ( ng only - specified by formName.elementName); only triggers the shortcut when on this form/element
Returns: True if the shortcut was successfully removed; otherwise, false.
{} component Element to show related to or null to center in screen
{} form The form to show
{} scope The scope to put retval into
{} dataProviderID The dataprovider of scope to fill
{} [width] Popup width
{} [height] Popup height
{} [x] Popup x location
{} [y] Popup y location
{} [showBackdrop] Whatever to show a dimmed backdrop under the popup
{} [doNotCloseOnClickOutside] Whether to close on not close the popup on clicking outside
{} [onClose] A callback function that is being triggered once the formpopup window is being closed
extends:
Returns: The FormPopup itself if it's used as a setter or the component if no argument is given
component The form to show Returns: The FormPopup itself if it's used as a setter or the component if no argument is given
form The form to show Returns: FormPopup
Returns: The FormPopup itself if it's used as a setter or the dataprovider value if no argument is given
dataprovider Form popup dataprovider Returns: The FormPopup itself if it's used as a setter or the dataprovider value if no argument is given
Returns: The FormPopup itself if it's used as a setter or the height if no argument is given
height Form popup height Returns: The FormPopup itself if it's used as a setter or the height if no argument is given
Returns: The FormPopup itself if it's used as a setter or the function value if no argument is given
onClose Function that needs to be called when closed Returns: The FormPopup itself if it's used as a setter or the function value if no argument is given
Returns: The FormPopup itself if it's used as a setter or the scope object if no argument is given
scope Form popup scope to modify Returns: The FormPopup itself if it's used as a setter or the scope object if no argument is given
Returns: The FormPopup itself if it's used as a setter or the showBackdrop value if no argument is given
showBackdrop Form popup showBackdrop Returns: The FormPopup itself if it's used as a setter or the showBackdrop value if no argument is given
Returns: The FormPopup itself if it's used as a setter or the width if no argument is given
width Form popup width Returns: The FormPopup itself if it's used as a setter or the width if no argument is given
Returns: The FormPopup itself if it's used as a setter or the x if no argument is given
x Form popup x location Returns: The FormPopup itself if it's used as a setter or the x if no argument is given
Returns: The FormPopup itself if it's used as a setter or the y value if no argument is given
y Form popup y location Returns: The FormPopup itself if it's used as a setter or the y value if no argument is given
extends:
Type:
enabled The enabled state; true to enable the menu, false to disable.
icon The icon to be used, which can be a media URL or an object representing the icon.
mnemonic The mnemonic key used for keyboard shortcuts.
Type:
Type:
Type:
Type:
Type:
key The key for the client property.
key The key for the client property.
value The value to set for the client property.
accelerator The accelerator key string, e.g. "ctrl alt Y".
bgColor The background color as a string (e.g., "#111111").
fgColor The foreground color as a string (e.g., "#EE5555").
icon The icon to set
method The callback function to be executed when the menu item is activated.
[arguments] An array of additional arguments to be passed to the callback function. The first five arguments are fixed: [0] item index, [1] parent item index, [2] isSelected boolean, [3] parent menu text, [4] menu text.
mnemonic The mnemonic key to be used as a shortcut indicator for the menu item.
visible The visibility state of the menu item.
extends:
Type:
component The component where this popup is linked in
[positionTop] The positionTop where to show the popup (default false)
component The component where this popup is linked in
x The x of the popup
y The y coordinate of the popup
[positionTop] The positionTop where to show the popup (default false)
event Event related to Popup
x The x of the popup
y The y coordinate of the popup
extends: