Drag and Drop in Open Client Overview |
Open Client Administration |
The new PROIV Open Client Drag and Drop functionality enables you to drag data from one PROIV Object to another object in the same session or even another session, or drag between a PROIV Object and the Aurora Framework , using the mouse. This behaviour is supported in PROIV applications deployed using PROIV Open Client , and applies to Static Icons objects in PROIV. The Static Icon can be a source object or a target object, or both, but note that if the Static Icon is disabled or invisible, it cannot be a source or a target object. The drag has an associated payload consisting of data (string or PROIV Array) and a Data Type. The drop is performed if certain conditions are met. (See the Validation section for more information.) When the drop occurs, Event Point logics are run that access the payload. These are called On Drop Target and On Drop Source. The On Drop Target logic in the Static Icon Event runs against the target object and is run after the payload is loaded into the DropDataVariable. The On Drop Source logic runs against the source object when the data is dropped, immediately after the On Drop Target logic has completed. This is needed when you want to perform processing on the source object, e.g. changing the label or graphic of the source object. Click here to view a diagram that explains the processes and time line involved in the Drag and Drop operation.
Note: Mandatory regen of functions built under Version 6 and 7 is not required for Version 7.1. However, if you want to take advantage of the Drag and Drop functionality in any new V7.1 functions, a regen is required. |
The Drag and Drop functionality is supported in the Open Client and the Static Icon object properties are used to turn on and off Drag and Drop functionality. The properties can be set up at design time, in a Property Sheet or in logic. Click here to see a screenshot of the Static Icon's Drag & Drop tab on the Property Sheet.
Warning: If the Static Icon is disabled or hidden, it cannot be configured as a drag source object or drop target object |
Sources and Targets
There are 2 possible Sources of a drag operation: |
|
There are 2 possible Targets of a drop operation: |
|
|
|
|
|
|
The following conditions must be met for the drop to occur, if not, the drop is prevented by the Open Client:
The PROIV Virtual Machine is busy, i.e. lightning bolt displayed in the PROIV MFC Client or waiting spinner displayed in Open Client.
The target Static Icon has the DropEnabled property set.
The target Static Icon has the DropTypeAllowed property set to match the Drag Type value held in the payload.
The target Static Icon has the Drop Item Limit set to > 0.
The target or source Static Icon is not hidden or disabled.
Click here to learn more about properties mentioned above.
If the drop is blocked by the Open Client or is cancelled by the user, (pressing the CANCEL key or releasing mouse when dragging, or dropping onto somewhere that is an invalid target, i.e. inside or outside the Open Client session), the payload is discarded and no events are fired.
If the Open Client permits the drop, the following events occur:
The string in the drag payload is loaded into the variable defined in the DropDataVariable property. For example, if DropDataVariable is set to $DROP_DATA, then $DROP_DATA contains the string in the payload after the drop. If the data is longer than $DROP_DATA is defined to take, truncation occurs with no indication to the Open Client or the user.
The Function Logic in the On Drop Target Static Icon event runs against the target object if set.
When the PROIV Virtual Machine is back in the busy state (i.e. lightning bolt displayed in the PROIV MFC Client or waiting spinner displayed in Open Client), the On Drop Source logic runs against the source object. (If the On Drop Target logic has caused the function to exit, the logic cannot run and there are no adverse effects).
It is not advisable for the On Drop Target logic to take a long time to run if there is a matching On Drop Source logic, but that is the developer’s responsibility to avoid this scenario.
Drag and Drop Demo contains a software simulation that explores the Drag and Drop functionality using the PROIV Sudoku Drag and Drop demo.
Customising the Drag Avatar Appearance Overview provides an overview of how to customise the Drag avatar's appearance.
Customising the Drag Avatar in PROIV explains how to configure the appearance of the Drag avatar in PROIV.
Customising the Drag and Drop Avatar in Open Client explains how to configure the appearance of the Drag avatar in Open Client.
Supported Drag and Drop Scenarios explains the various Drag and Drop permutations that are permissible.
Enabling Drag and Drop for the Open Client provides details of how to enable Drag and Drop functionality in PROIV for Open Client.
Dragging from a Static Icon explains what is involved when a Drag operation occurs and how to configure it.
Drag and Drop Event Points Overview provides an overview of the On Drop Source and On Drop Target Event Points.
Topic ID: 800096