Drag and Drop (dnd)¶
Insight Explorer offers drag and drop functionality in different scenarios
- Tree node onto attribute field (Maximo and Details)
- (Tree internal) from node item 1 to node item 2
- Tree to table header
Drag and Drop onto attribute field:
If you drop an node from a tree onto an attribute field the client tries to fill the target with the following logic:
- Tree node has an attribute with the same name as the target
- Tree node is from type
object
and has an attributeid
, target attribute is namedobjectId
- Target attribute has a dnd.srcAttribute configuration, see example below
- If all fail the label will be put into the attribute input
Drag and Drop onto tables, planning or inside trees:
The configuration has to be on the top level section of the target as follows:
"dnd": [
{
"src": "Standort",
"dst": "Standort",
"action": {
"action": "request",
"request": {
"method": "GET",
"url": "../maximo/webclient/insight/rest/changeLocationParent.jsp",
"params": {
"location": "${src.LOCATION}",
"parent": "${dst.LOCATION}",
"system": "${dst.SYSTEMID}",
"site": "${dst.SITEID}",
"dummy": "${userData.personid}"
}
}
}
}
]
"dnd": [
{
"src": "Person",
"dst": "Person",
"action": {
"method": "POST",
"url": "insight/eam/rpc/insightTest/mitarbeiter",
"params": {
"vorgesetzter": "${dstObject.uniqueId}",
"mitarbeiter": "${srcObject.uniqueId}"
},
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
}
}
}
]
src
: name of drag nodedst
: name of drop nodeaction
: defines a method call to handle the dnd actionurl
: Url to be calledparams
: URL-parameter URL,"Key": "Value"
- Values can be retrieved via reference, e.g.
${src.LOCATION}
is automatically filled with the value of the attributeLOCATION
from the src (=dragged) object - Values can be fixed values, e.g.
fixed value
- Values can be retrieved via prefilled object, e.g.
${userData.personid}
. - See also chapter working with variables/values
- Values can be retrieved via reference, e.g.
headers
: URL-headers, "Key": "Value"