Make drag-and-drop assignments

Technologies > Software Engineering Techniques > Software Engineer Views > Make Drag and Drop Assignments

 

In this example view the user drags an Application or Process from the Application Tree view and assigns it to a user by dropping it over the User Process grid. Enable dragging application and process nodes from the application tree:

this.userProcs_activityTree.enableDragForLevel(0, true);
this.userProcs_activityTree.enableDragForLevel(1, true);


The event handler for the drag drop event is auto-wired according to the naming convention panelId_onDragDrop.The record's primary key values can then be retrieved from the data variable:

userProcs_userProcessGrid_onDragDrop: function(dragSource, data) {...
    var values = data.getPrimaryKeyValues();
    var processId = values['afm_processes.process_id'];


The event handler for the drag over event is auto-wired according to the naming convention panelId_onDragOver:

userProcs_userProcessGrid_onDragOver: function(dragSource, data) {

    ...

}

 

View: http://localhost:8080/archibus/schema/ab-products/solutions/programming/dragdrop/ab-ex-user-procs.axvw