Members
Shows a "quick form" dhtml-popup for editing an object.
The form is configured with a set properties. It doesn't, however, depend on a data object type and it doesn't load and save to the data object repository.
Not all kinds of properties are allowed - it depends on the data type and control type used.
Example
var properties = [];
properties.push({ name: 'Name', propertyName: 'NAME', caption: 'Name', requiresValue: true });
properties.push({ name: 'Description', propertyName: 'DESCRIPTION', caption: 'Description', requiresValue: true });
omada.dialogHelper.showQuickFormDlg({
formId: 'MyQuickForm',
properties: properties,
caption: 'Please enter name'
});
Methods
Configures a jQuery dhtml tree structure.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
roots |
array
|
array of tree root node objects:
Properties
Name |
Type |
Description |
id |
string
|
node identifier |
title |
string
|
The dialog title whic will be displayed in the tree |
selectable |
bool
|
Is the user allowed to select the object in the dialog? |
icon |
string
|
Icon filename (example: 'images/appicons16/element.png') |
tag |
string
|
Optional info which is delivered to the demandLoad function as .tag |
state |
object
|
optional - Default state of the node
Properties
Name |
Type |
Description |
opened |
bool
|
Is the node open |
disabled |
bool
|
Is the node disabled |
selected |
bool
|
Is the node selected |
|
|
contextmenu |
array
|
Array of context menu items |
demandLoad |
function
|
Callback function(options) called by the dialog when a node is expanded by the user and children needs to be loaded
Properties
Name |
Type |
Description |
options |
number
|
Options object for the callback
Properties
Name |
Type |
Description |
id |
number
|
Id of the node that has been expanded |
ancestors |
array
|
Array of all ancestors - root is in index 0. Each ancestor object has:
Properties
Name |
Type |
Description |
id |
number
|
Node id of the ancestor |
tag |
string
|
Tag of the ancestor |
|
tag |
string
|
optional info that was specified to loadCompleted by (a previous call to) demandLoad |
treeTag |
string
|
optional object with info that was specified in the options.tag for the tree |
treeOptions |
string
|
the options originally provided to the tree function |
loadCompleted |
function
|
Callback function(result) that must be called by the demand load function when the data is loaded
Properties
Name |
Type |
Description |
result |
object
|
The result of the demand load
Properties
Name |
Type |
Description |
objects |
array
|
Array of loaded objects:
Properties
Name |
Type |
Description |
id |
number
|
Id of the node to be added |
title |
string
|
Value to be displayed for the node in the tree |
selectable |
bool
|
Is the user allowed to select the node in the dialog? |
canExpand |
bool
|
Can the user expand the node in the tree? |
icon |
string
|
Icon filename (example: 'images/appicons16/element.png') |
tag |
string
|
Optional object with node-info which is delivered to the demandLoad function as .tag |
onClick |
string
|
Optional name of a JavaScript function being called when the cell i clicked. The function get the id as the only parameter. The object must be selectable. |
state |
object
|
Optional - Default state of the node
Properties
Name |
Type |
Description |
opened: |
bool
|
Is the node open |
disabled |
bool
|
Is the node disabled |
selected |
bool
|
Is the node selected |
|
|
|
|
|
|
tag |
string
|
optional - info which is delivered to the demandLoad function as .treeTag |
|
Example
var roots = [];
roots.push({ id: 1, title: 'My tree root', icon: 'images/appicons16/folder.png' });
omada.dialogHelper.configureTree({
title: 'My tree dialog',
roots: roots,
demandLoad: function (parent) {
var objects = [];
objects.push({ id: 2, canExpand: false, title: 'my tree child', icon: 'images/appicons16/folder.png' });
parent.loadCompleted({ objects: objects });
},
});
(static) debounce(func, wait)
Prevent function from being called more frequent than specified interval to avoid too many function calls on key down, scroll events etc.
Parameters:
Name |
Type |
Description |
func |
object
|
function |
wait |
number
|
time inteveral |
(static) showAccordionDialog(options)
Shows a modal DHTML dialog with an accordion control
each panel header can be accessed through the DOM via the id {containerId}_header_{panelId}
each panel can be accessed through the DOM via the id {containerId}_panel_{panelId}
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
containerId |
string
|
Id of div container which will be created to hold the dialog (html) |
dialogTitle |
string
|
Title of the dialog |
dialogContent |
string
|
Content to show in the dialog above the accordion |
heightStyle |
string
|
"auto": All panels will be set to the height of the tallest panel. "fill": Expand to the available height based on the accordion's parent height. "content": Each panel will be only as tall as its content. |
height |
number
|
Height of the dialog window |
width |
number
|
Width of the dialog window |
panels |
array
|
Array of panels to show in the accordion
Properties
Name |
Type |
Description |
id |
string
|
Panel id |
title |
string
|
Panel title |
icon |
string
|
Icon to show before the title |
|
sections.content |
string
|
Panel content (html) |
nonModal |
bool
|
If true the dialog will be non-blocking. By default is is blocking |
buttons |
array
|
Array of buttons to be shown in the dialog.
Properties
Name |
Type |
Description |
text |
string
|
Button caption. |
click: |
function
|
function activated on click. |
|
onOpen: |
function
|
function activated on click. |
onClose: |
function
|
function(event) called when the dialog is closed |
onActivate: |
function
|
function(event, ui) Triggered after a panel has been activated (after animation completes). |
resizeStop: |
function
|
function(event, ui) binds to resizeStop event of the dialog
If the accordion was previously collapsed, ui.oldHeader and ui.oldPanel will be empty jQuery objects.
If the accordion is collapsing, ui.newHeader and ui.newPanel will be empty jQuery objects. |
allowMultipleOpenPanels |
bool
|
If true, multiple panels can be unfolded |
|
Example
omada.dialogHelper.showAccordionDialog({
containerId: 'myAccordionDlg',
dialogTitle: 'Accordion dialog',
dialogContent: "This is an accordion dialog",
panels: [
{id: "panel1", title: "Panel1", content: "Hello panel1"},
{id: "panel2", title: "Panel2", content: "Hello panel2"}
]
});
(static) showConfirmation(options)
Shows a modal confirmation dialog with OK/Cancel buttons. The dialog doesn't block the program flow.
To resume the program flow when the dialog closes implement the onClick function in the options.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
message |
string
|
Content of the message dialog |
title |
string
|
Windows title for the dialog |
nonModal |
bool
|
If true, the confirmation will not be shown as a blocking dialog |
htmlEncode |
bool
|
Html encode the message? |
convertCRtoBR |
bool
|
If true, the carriage returns characters in the message will be converted to html breaks. |
okClick |
function
|
Callback: function(aSelectedItems, aSelectedObjects) - is called when "Ok" has been clicked in the dialog and at least one item is selected. |
cancelClick |
function
|
(Optional) Callback: function() - is called when "Cancel" has been clicked in the dialog |
disableForcedClose |
bool
|
If true, it will not be possible to close the dialog using the escape key. The close button in the top-right corner of the dialog will also be hidden |
height |
number
|
Height of the dialog window |
width |
number
|
Width of the dialog window |
|
Example
omada.dialogHelper.showConfirmation({
title: 'Input required',
message: 'If you click OK, the data will be submitted for approval',
okClick: function () { closeDialog(CDR_Ok); }
});
(static) showCopyRuleSelectionDialog(options)
// Shows a grid selection dialog for selecting copy rules
// options:
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
sourceDataObjectTypeId |
array
|
- |
targetDataObjectTypeId |
array
|
- |
negIds |
array
|
Array of copy rule Ids. If specified those copy rules will not be displayed in the grid |
multiSelection |
bool
|
If true, the user is allowed to select multiple data object types. |
showNewButton |
bool
|
If true the selection dialog will include a button to create a new copy rule |
selectionCompleted |
function
|
Callback function(selectedIds, selectedRows) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected.
Properties
Name |
Type |
Description |
selectedIds |
array
|
Array of the ids of the selected rows in the grid |
selectedRows |
object
|
Object with array of items.
Properties
Name |
Type |
Description |
items |
array
|
Each item in the array has a field corresponding to a column name in the grid.
Properties
Name |
Type |
Description |
id |
number
|
The ID of the selected copy rule |
name |
number
|
The name of the copy rule |
uid |
string
|
The uid of the copy rule |
|
|
|
readOnly |
bool
|
If true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of OK/Cancel.
- .multiSelection and .selectionCompleted are ignored. |
title |
string
|
The title on the dialog popup. |
|
Shows a "quick form" dhtml-popup showing the details of a data object.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
divId |
object
|
Desired DOM id of the dhtml form |
dataObjectId |
object
|
Id or UId of a DataObject |
formId |
object
|
Id or uid of a DataObject Form (optional). If not specified the default DOT form is used |
caption |
object
|
Caption on the dialog popup |
beforeShow |
function
|
Callback function(formData) called right before the dialog is shown
Properties
Name |
Type |
Description |
formData |
object
|
Object provided to the callback
Properties
Name |
Type |
Description |
dlg |
object
|
Dialog object |
ctrlIds |
object
|
Object where each field name is a Property SystemName and the value is the control id |
|
|
nonModal |
bool
|
Do not show the dialog in modal mode |
width |
number
|
Width of the dialog (in pixels) |
height |
number
|
Height of the dialog (in pixels) |
|
Example
omada.dialogHelper.showDataObjectQuickFormDlg({ dataObjectId: '60CCEC0C-DAD1-4DF8-BB09-C77F15029FCD', divId: 'dataObjQuickForm', width: 500})
(static) showDataObjectSelectionDialog(options) → {object}
Function shows a DHTML dialog for selecting Data Objects from a grid.
A Data Object View is used for configuring columns and filtering.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
lookupViewId |
number
|
string
|
Id or UId of the Data Object View used to filter data and format columns. |
objectIds |
array
|
Array of Data Object Ids. If specified only those objects will be displayed in the grid. Deprecated: Use options.expressions instead. |
negIds |
array
|
Array of Data Object Ids. If specified those objects will not be displayed in the grid. Deprecated: Use options.expressions instead. |
referrerIds |
array
|
Array of Data Object Ids. Only include Data Objects that are referred by one or more of these Data Objects via a Reference Property. Deprecated: Use options.expressions instead. |
referredIds |
array
|
Array of Data Object Ids. Only include Data Objects that has a reference to one or more of these Data Objects via a Reference Poperty. Deprecated: Use options.expressions instead. |
multiSelection |
bool
|
Allow the user to select multiple Data Objects? |
selectionCompleted |
function
|
Callback: function(aSelectedItems, aSelectedObjects) - is called when "Ok" has been pressed in the dialog and at least one item is selected.
Properties
Name |
Type |
Description |
aSelectedItems |
array
|
An array of the Ids of the selected Data Objects. |
aSelectedObjects |
array
|
An array of the selected Data Objects.
Properties
Name |
Type |
Description |
id |
number
|
Id |
displayName |
string
|
Display Name |
|
|
readOnly |
bool
|
If true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of Ok/Cancel.
- No grid toolbuttons are shown.
- selectionCompleted is ignored |
title |
string
|
Dialog title. If not specified the view name will be used. |
pageContext |
string
|
Text string which will be passed on to the AccessModifier specified on the Data Object View (if any) in the parameter _PAGECONTEXT. |
width |
int
|
An option to specify the width of the grid. Can be used when the dialog title is wider than the grid. By default the width is calculated. |
expressions |
array
|
Array of expression objects which are used for filtering the Data Objects shown in the grid.
Properties
Name |
Type |
Description |
path |
string
|
Reference path from the Data Objects in the view to the Data Object that the expression is for. |
property |
string
|
Property/fixed field to filter on. |
operator |
string
|
Operator [Equals, LessThan, GtThan, LessThanEq, GtThanEq, NotEquals, Like, In, NotIn] |
value |
|
Filter value for the expression. Can be either a: string, bool or array.
An array (of string) is valid if the property is a Set- or Reference-property. It can then specify Data Object Ids or UIds.
If the property has data type DateTime the filter value must be a DateTime in xml format. |
|
extraButtons |
array
|
Array of additional UI Actions to be shown in the toolbar above the grid.
Properties
Name |
Type |
Description |
caption |
string
|
Button caption. |
img |
string
|
jQuery UI img name. Example: 'ui-icon-plus'. Find supported icons here: http://jqueryui.com/themeroller/ |
tooltip |
string
|
|
clickEvent |
function
|
Parameter-less function activated on click. |
|
userGroupOptions |
object
|
Object with options related to user groups. The options are only used if the view filters (exactly) on user groups.
Properties
Name |
Type |
Description |
memberGroupIds |
array
|
Array of user group ids. Only personal user groups belonging to users, who are member of the all the groups specified, will be included. |
grpIncludes |
array
|
Array of strings on format: [user group id]:[0-3] where the number 0-3 means: None=0, GroupOnly=1, MembersOnly=2, Both=3 |
excludePersonal |
bool
|
Exclude personal user groups? |
excludeSystem |
bool
|
Exclude user groups marked as "system" objects? |
includeSystemUser |
bool
|
Include the personal user group for the "System" user? |
includeDummies |
bool
|
Include the built-in "dummy" user groups? |
includeProcessCreator |
bool
|
Include the built-in generic "process creator" user group? |
includeProcessOwner |
bool
|
Include the built-in generic "process owner" user group? |
excludeEveryone |
bool
|
Exclude the "Everyone" user group? |
includeActiveUser |
bool
|
Include the built-in generic "active user" user group? |
excludeNoneGroup |
bool
|
Exclude the "None" user group? |
|
assigneeMode |
bool
|
Go into assignee selection mode? (bool). Requires that the view filters exactly on users and user groups. |
assigneeOptions |
object
|
Object with options related to assignees. The options are only used if assigneeMode is used.
Properties
Name |
Type |
Description |
memberGroupIds |
array
|
Array of user group ids. Only users, who are member of the all the groups specified, will be included. |
grpIncludes |
array
|
Array of strings on format: [user group id]:[0-3] where the number 0-3 means: None=0, GroupOnly=1, MembersOnly=2, Both=3 |
|
beforeShow |
string
|
function(args) - fires before the dialog is shown. |
beforeSelectRow |
bool
|
: function fires when the user click on a row, but before the row is selected. |
uiActions |
array
|
Array of UI action style buttons to place above grid
Properties
Name |
Type |
Description |
btnId |
string
|
Button id |
caption |
string
|
Button caption |
disabled |
string
|
should button be disabled |
clickData: |
string
|
optional object that is available in the clickHandler's e.data |
clickHandler |
string
|
function(e) |
isSecondary |
string
|
button is secondary and will be placed in more menu |
|
|
Returns:
Returns an object:
.dialogId - Id of the dialog.
.gridId - Id of the grid (in the dialog).
.getSelItems - Function (parameterless) that returns an array with the selected ids in the grid.
.getSelObjs - Function (parameterless) that returns an array with the selected Data Objects in the grid. Each object has a .id and .displayName.
-
Type
-
object
Example
omada.dialogHelper.showDataObjectSelectionDialog(
{
lookupViewId: '2E03DE34-75C4-4C61-8F84-0156F094677D',
multiSelection: true,
selectionCompleted: function (aSelectedItems, aSelectedObjects) {
for (var i = 0; i < aSelectedObjects.length; i++)
showMessageDlg(S_COMMON_Text_Warning, 'Selected object with index ' + i + ' has id ' + aSelectedObjects[i].id + ' and display name "' + aSelectedObjects[i].displayName + "'");
}
});
(static) showDataObjectTypeSelectionDialog(options)
Shows a jQuery grid dhtml selection dialog for selecting data objects types.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
includeShadowDataObjectTypes |
bool
|
If true, Shadow Data Object Types are loaded alongside the regular ones. |
negIds |
array
|
Array of data object type ids. If specified only those objects will not be displayed in the grid. |
multiSelection |
bool
|
If true, the user is allowed to select multiple data object types. |
selectionCompleted |
function
|
Callback function(selectedIds, selectedRows) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected.
Properties
Name |
Type |
Description |
selectedIds |
array
|
Array of the ids of the selected rows in the grid |
selectedRows |
object
|
Object with array of items.
Properties
Name |
Type |
Description |
items |
array
|
Each item in the array has a field corresponding to a column name in the grid.
Properties
Name |
Type |
Description |
_id |
number
|
The ID of the selected item |
id |
number
|
The ID of the selected type |
icon |
number
|
The icon file for the selected item |
number |
number
|
The number of the selected item |
name |
number
|
The name of the selected type |
description |
number
|
The description of the selected item |
systemName |
number
|
The system name of the type |
|
|
|
readOnly |
bool
|
If true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of OK/Cancel.
- .multiSelection and .selectionCompleted are ignored. |
title |
string
|
The title on the dialog popup. |
|
Example
omada.dialogHelper.showDataObjectTypeSelectionDialog(
{
selectionCompleted: function (aSelectedItems, aSelectedRows)
{
showMessageDlg(S_COMMON_Text_Warning, 'selected type id: ' + aSelectedItems[0]);
}
});
(static) showDataSourceSelectionDialog(options)
// Shows a dialog with grid for data source data
// options:
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
dataSourceName |
string
|
name of the query |
title |
string
|
dialog title |
totalCount |
int
|
total count of data if present |
|
(static) showDialog(options)
Shows a simple modal DHTML dialog which can be used to show text/html content
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
title |
string
|
Title (text) of the message dialog (window title) |
containerId |
string
|
Id of div container which will be created to hold the dialog (html) |
content |
string
|
Message (html)containerId |
nonModal |
bool
|
If true the dialog will be non-blocking. By default is is blocking |
buttons |
array
|
Array of buttons to be shown in the dialog.
Properties
Name |
Type |
Description |
text |
string
|
Button caption. |
click: |
function
|
function activated on click. |
|
htmlEncode |
bool
|
Html encode the message? |
cssClass |
string
|
Custom css class(es) to used in the dialog |
convertCRtoBR |
bool
|
If true, then carriage returns are converted to html line breaks in the message |
height |
number
|
Height of the dialog window |
width |
number
|
Width of the dialog window |
editableMessage |
bool
|
Make the message editable (and selectable)? |
onOpen: |
function
|
function(event) called when the dialog is shown initially |
onClose: |
function
|
function(event) called when the dialog is closed |
destroyOnClose: |
function
|
If true the dialog will be destroyed after closing |
resizeStop: |
function
|
function(event, ui) binds to resizeStop event of the dialog |
|
Example
omada.dialogHelper.showDialog({ containerId: 'myDialog', content: 'Welcome <b>[user]</b>', title: 'Welcome dialog' });
(static) showKpiDrillDownDataSourceSelectionDialog(options)
// Shows a dialog for KPI data source
// options:
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
kpiId |
string
|
Id of the KPI |
title |
string
|
dialog title |
|
(static) showMessage(options)
Shows a simple modal DHTML message dialog. The call does not block the program flow. To resume the program flow when the dialog closes implement the onClick function in the options.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
title |
string
|
Title (text) of the message dialog (window title) |
message |
string
|
Message (html) |
nonModal |
bool
|
If true the dialog will be non-blocking. By default is is blocking |
okClick |
string
|
Parameter-less function activated on click |
htmlEncode |
bool
|
Html encode the message? |
convertCRtoBR |
bool
|
If true, then carriage returns are converted to html line breaks in the message |
height |
number
|
Height of the dialog window |
width |
number
|
Width of the dialog window |
editableMessage |
bool
|
Make the message editable (and selectable)? |
|
Example
omada.dialogHelper.showMessage({ title: 'Warning', message: 'Invalid input in system search mask' });
Shows a simple modal message popup without any buttons or title. The popup is closed by clicking outside of it. The size of the popup adjusts to the length of the message.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
message |
string
|
Message (html) |
htmlEncode |
bool
|
Html encode the message? |
convertCRtoBR |
bool
|
If true, then carriage returns are converted to html line breaks in the message |
|
Example
omada.dialogHelper.showPopupMessage({ message: 'Hello there my friend' });
(static) showPropertySelectionDialog(options)
Shows a jQuery grid dhtml selection dialog for properties.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
showSystemNameCol |
bool
|
Show a column with systemname of properties. Hidden by default. |
negIds |
array
|
Array of property ids. If specified only those objects will not be displayed in the grid. |
excludeNonSuitableForRegularDOTBindings |
bool
|
Exclude certain properties which aren't relevant for data object bindings. E.g. properties prefixed with SSOT_ or SURVFLD_ |
negSystemNames |
array
|
Array of system names. If specified only those objects will not be displayed in the grid. |
propertyTypes |
array
|
Array of property types to be displayed |
propertyDataTypes |
array
|
Array of property(value) data types to be displayed |
dataObjectTypeIds |
array
|
Array of data object type ids - only display properties used on the specified types |
attributeSuitableProperties |
bool
|
Only include properties that are suitable to be used as "attribte properties" on a reference property |
multiSelection |
bool
|
If the the the user is allowed to select multiple objects |
selectionCompleted |
function
|
Callback function(selectedIds, selectedRows) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected.
Properties
Name |
Type |
Description |
selectedIds |
array
|
Array of the ids of the selected rows in the grid |
selectedRows |
object
|
Object with array of items
Properties
Name |
Type |
Description |
items |
array
|
Array of items (.items) where each item has a field corresponding to a column name in the grid - in addition each item also has a ._id
Properties
Name |
Type |
Description |
_id |
number
|
ID of the selected property |
id |
number
|
ID of the selected property |
number |
number
|
Property number |
systemName |
string
|
System name of the property |
name |
string
|
Name of the selected property |
type |
string
|
Property type |
type_property |
string
|
Contains Value, Set or Reference |
datatype |
string
|
Data type of the selected property |
controltype |
string
|
Control type of the selected property |
description |
string
|
Property description |
|
|
|
readOnly |
bool
|
If true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of ok/cancel
- .multiSelection and .selectionCompleted are ignored |
title |
string
|
The title of the dialog |
|
Example
omada.dialogHelper.showPropertySelectionDialog(
{
selectionCompleted: function (aSelectedIds, aSelectedRows)
{
showMessageDlg(S_COMMON_Text_Warning, 'selected property system name: ' + aSelectedRows.items[0].systemName);
}
});
(static) showReferenceTreeSelectionDialog(options)
Shows a jQuery dhtml selection dialog for selecting reference property values in a tree formed by a reference property.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
objectTypeId |
number
|
string
|
Hierarchy is formed of data objects of this type (id or uid) |
viewuid |
string
|
Optional UId of a Data Object View. If applied, an AccessModifer defined on the Data Object View will be applied to the load options. |
parentProperty |
string
|
Property SystemName of reference property that points to an object's parent |
multiSelection |
bool
|
If true the user is allowed to select multiple objects |
selectionCompleted |
function
|
Callback function(result) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected.
Properties
Name |
Type |
Description |
result |
object
|
Result object
Properties
Name |
Type |
Description |
selectedItems |
array
|
Array of the selected nodes:
Properties
Name |
Type |
Description |
id |
string
|
Id of the node |
tag |
string
|
Tag of the node |
|
|
|
title |
string
|
Title of the dialog |
folderIcon |
string
|
Icon to show when showing a folder node |
leafIcon |
string
|
Icon to show when showing a leaf node |
loadedObjectsEvaluator |
function
|
Callback function(data) to be called when data object nodes have been loaded which allows for final manipulation to eg. set a node as "disabled".
Properties
Name |
Type |
Description |
data |
object
|
The loaded data which corresponds to the 'result' object of the 'loadCompleted' callback of the omada.dialogHelper.showTreeSelectionDialog API. |
|
|
Example
omada.dialogHelper.showReferenceTreeSelectionDialog({
objectTypeId: '3178BF72-A4C5-4AED-9084-6BB99AA42510',
parentProperty: 'PARENTOU',
selectionCompleted: function(result) {
showMessageDlg(S_COMMON_Text_DlgTitle_Message, result.selectedItems[0].id);
}
});
(static) showResourceAssigmentAttributesDialog(options)
// Displays a grid dialog with the attribute values for a ResourceAssignment data object
// options:
// .resAssnId: id or uid of a ResourceAssignment data object (reqd)
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
resAssnId |
string
|
id or uid of a ResourceAssignment data object (reqd) |
|
Example
omada.dialogHelper.showResourceAssigmentAttributesDialog({ resAssnId: '2000' });
(static) showResourceAssignmentsDialog(options)
Contains logic for showing a popup grid with "direct assignments".
The grid allows for expiring assignments - but only if the user has the proper permissions.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
viewId |
string
|
View uid for resource assignments |
readOnly |
bool
|
If true, the grid is shown in read only mode |
multiSelection |
bool
|
If true, the user can select multiple objects |
expressions |
array
|
Array of expression objects which are used for filtering the Data Objects shown in the grid.
Properties
Name |
Type |
Description |
path |
string
|
Reference path from the Data Objects in the view to the Data Object that the expression is for. |
property |
string
|
Property/fixed field to filter on. |
operator |
string
|
Operator [Equals, LessThan, GtThan, LessThanEq, GtThanEq, NotEquals, Like, In, NotIn] |
value |
|
Filter value for the expression. Can be either a: string, bool or array.
An array (of string) is valid if the property is a Set- or Reference-property. It can then specify Data Object Ids or UIds.
If the property has data type DateTime the filter value must be a DateTime in xml format. |
|
|
Example
omada.dialogHelper.showResourceAssignmentsDialog(
{
viewId: '16f6208f-52ba-4f1a-93b4-ca726fff3828',
readOnly: false,
multiSelection: true,
});
(static) showRoPECalculatedAssignmentsDialog(options)
The function shows a grid dialog containing RoPE calculated assignments
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
accountTypeIds |
array
|
Array of account type ids |
resourceIds |
array
|
Array of resource ids |
identityIds |
array
|
Array of identity ids |
systemIds |
array
|
Array of system ids |
constraintIds |
array
|
Array of constraint ids |
causeObjectIds |
array
|
Array of "cause" data object ids. We'll only load assignments caused by the objects with the ids. Data objects of the following types can be cause objects: ResourceAssignment, AssignmentPolicy and (parent) Resource. |
prioritizationPolicyIds |
array
|
Array of prioritization policy data object ids. We'll only load assignments affected by the objects with the ids. |
categoryFilter |
number
|
0 = account assignments 1 = resource assignments 2 = both(default) |
attributeExpressions |
array
|
Array of expression objects which are applied against attribute values:
Properties
Name |
Type |
Description |
property |
string
|
Property(attribute) to filter on |
operator |
string
|
Operator [Equals] |
value |
string
|
Filter value. |
|
resourceExpressions |
array
|
Array of expression objects which are applied against resources:
Properties
Name |
Type |
Description |
path |
string
|
Reference path from the objects in the view to the objects the expression is for |
property |
string
|
Property/fixed field to filter on |
operator |
string
|
Operator [Equals, LessThan, GtThan, LessThanEq, GtThanEq, NotEquals, Like, In, NotIn] |
value |
|
Filter value. Can be either a: string, boolean, DateTime or array of string.
An array of string is valid if the property is a Set- or Reference-property. It can then specify int or guid ids. |
loadAttributes |
bool
|
Must be set to true if the 'attributes' column is displayed. There is a performance penalty using this option. |
loadReasons |
bool
|
Must be set to true if the 'reasons' column is displayed. There is a performance penalty using it. |
|
excludeDisabled |
bool
|
set to true to exclude disabled cras from data. default is false |
fAdjustGridParams |
bool
|
function which can modify the calculated grid params, for instance the colModel |
|
Example
omada.dialogHelper.showRoPECalculatedAssignmentsDialog({ resourceIds: [appPageVars.formDataId] })
(static) showTreeSelectionDialog(options)
Shows a jQuery dhtml selection dialog for selecting arbitrary objects in a tree structure.
Parameters:
Name |
Type |
Description |
options |
object
|
Options object.
Properties
Name |
Type |
Description |
height |
number
|
height of the dialog |
width |
number
|
width of the dialog |
readOnly |
bool
|
if true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of ok/cancel.
- .selectionCompleted are ignored. |
dialogOpen |
function
|
Callback function which will be called when the dialog is opened |
oButtons: |
object
|
Buttons object (see jQuery UI docs: http://api.jqueryui.com/dialog/#option-buttons)
Note: these buttons are dialog buttons. |
roots |
array
|
array of tree root node objects:
Properties
Name |
Type |
Description |
id |
string
|
node identifier |
title |
string
|
The dialog title whic will be displayed in the tree |
selectable |
bool
|
Is the user allowed to select the object in the dialog? |
icon |
string
|
Icon filename (example: 'images/appicons16/element.png') |
tag |
string
|
Optional info which is delivered to the demandLoad function as .tag |
state |
object
|
optional - Default state of the node
Properties
Name |
Type |
Description |
opened |
bool
|
Is the node open |
disabled |
bool
|
Is the node disabled |
selected |
bool
|
Is the node selected |
|
|
contextmenu |
array
|
Array of context menu items |
multiSelection |
bool
|
Is the user allowed to select multiple objects? |
demandLoad |
function
|
Callback function(options) called by the dialog when a node is expanded by the user and children needs to be loaded
Properties
Name |
Type |
Description |
options |
number
|
Options object for the callback
Properties
Name |
Type |
Description |
id |
number
|
Id of the node that has been expanded |
ancestors |
array
|
Array of all ancestors - root is in index 0. Each ancestor object has:
Properties
Name |
Type |
Description |
id |
number
|
Node id of the ancestor |
tag |
string
|
Tag of the ancestor |
|
tag |
string
|
optional info that was specified to loadCompleted by (a previous call to) demandLoad |
treeTag |
string
|
optional object with info that was specified in the options.tag for the tree |
treeOptions |
string
|
the options originally provided to the tree function |
loadCompleted |
function
|
Callback function(result) that must be called by the demand load function when the data is loaded
Properties
Name |
Type |
Description |
result |
object
|
The result of the demand load
Properties
Name |
Type |
Description |
objects |
array
|
Array of loaded objects:
Properties
Name |
Type |
Description |
id |
number
|
Id of the node to be added |
title |
string
|
Value to be displayed for the node in the tree |
selectable |
bool
|
Is the user allowed to select the node in the dialog? |
canExpand |
bool
|
Can the user expand the node in the tree? |
icon |
string
|
Icon filename (example: 'images/appicons16/element.png') |
tag |
string
|
Optional object with node-info which is delivered to the demandLoad function as .tag |
state |
object
|
Optional - Default state of the node
Properties
Name |
Type |
Description |
opened: |
bool
|
Is the node open |
disabled |
bool
|
Is the node disabled |
selected |
bool
|
Is the node selected |
|
|
|
|
|
|
selectionCompleted |
function
|
Callback function(result) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected. (optional)
Properties
Name |
Type |
Description |
result |
object
|
Result object
Properties
Name |
Type |
Description |
selectedItems |
array
|
Array of the selected nodes:
Properties
Name |
Type |
Description |
id |
number
|
Id of the node |
tag |
string
|
Tag of the node |
|
|
|
title |
string
|
The title of the dialog popup window |
tag |
string
|
optional - info which is delivered to the demandLoad function as .treeTag |
requireCreateAccess |
string
|
load and populate the field hasCreateRight |
|
Example
var roots = [];
roots.push({ id: 1, title: 'My tree root', icon: 'images/appicons16/folder.png' });
omada.dialogHelper.showTreeSelectionDialog({
title: 'My tree dialog',
width: 640,
height: 480,
roots: roots,
demandLoad: function (parent) {
var objects = [];
objects.push({ id: 2, canExpand: false, title: 'my tree child', icon: 'images/appicons16/folder.png' });
parent.loadCompleted({ objects: objects });
},
selectionCompleted: function (result) {
showMessageDlg(S_COMMON_Text_DlgTitle_Message, 'selected object: ' + result.selectedItems[0].id);
}
});
(static) showViewSelectionDialog(options)
// Shows a grid selection dialog for selecting data object views
// options:
Parameters:
Name |
Type |
Description |
options |
object
|
Options object
Properties
Name |
Type |
Description |
dataObjectTypeIds |
array
|
array of data object type ids. If supplied, only views filtering on these types are loaded |
viewOwnerFlags |
string
|
Refer to the ViewOwnerFlags_ constant. Default is ViewOwnerFlags_Default |
viewOwner |
string
|
Refer to the ViewOwner_ constant. Default is ViewOwner_Default |
requireExactDataObjectTypeMatch |
bool
|
(Optional) If set to true, only views matching the excact filtering of data object types provided in the dataObjectTypeIds param, are loaded |
negIds |
array
|
Array of view Ids. If specified those views will not be displayed in the grid |
multiSelection |
bool
|
If true, the user is allowed to select multiple data object types. |
showNewButton |
bool
|
If true the selection dialog will include a button to create a new view |
selectionCompleted |
function
|
Callback function(selectedIds, selectedRows) to be called when "Ok" has been pressed in the dhtml dialog and at least one item is selected.
Properties
Name |
Type |
Description |
selectedIds |
array
|
Array of the ids of the selected rows in the grid |
selectedRows |
object
|
Object with array of items.
Properties
Name |
Type |
Description |
items |
array
|
Each item in the array has a field corresponding to a column name in the grid.
Properties
Name |
Type |
Description |
id |
number
|
The ID of the selected view |
name |
number
|
The name of the selected view |
uid |
string
|
The uid of the selected view |
|
|
|
readOnly |
bool
|
If true the dialog is shown in read-only mode with the following impact:
- A 'close' button is shown instead of OK/Cancel.
- .multiSelection and .selectionCompleted are ignored. |
title |
string
|
The title on the dialog popup. |
|