Same Session Drag and Drop Overview |
Open Client Administration |
Same Session dragging and dropping means that you can click on a PROIV Static Icon (Icon A) and drag the mouse pointer to another PROIV Static Icon (Icon B) in the same PROIV Open Client Session. A payload of PROIV data (a string) and the Data Type is attached to the drag from Icon A. (This is controlled by the PROIV developer.) When the drop occurs on Icon B, two Function Logics are actioned in turn that accesses the data 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.
The drop occurs if the following statements are true (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 DropItemLimit set to > 0.
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 Open Client runs the On Drop Source logic against the source object. (If the On Drop Target logic causes 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.
Topic ID: 800108