Package org.primefaces.event

Examples of org.primefaces.event.DragDropEvent


   
    if(params.containsKey(clientId)) {
      String dragId = params.get(clientId + "_dragId");
      String dropId = params.get(clientId + "_dropId");
     
      droppable.queueEvent(new DragDropEvent(droppable, dragId, dropId));
   
  }
View Full Code Here


            AjaxBehaviorEvent behaviorEvent = (AjaxBehaviorEvent) event;

            if(eventName.equals("drop")) {
                String dragId = params.get(clientId + "_dragId");
                String dropId = params.get(clientId + "_dropId");
                DragDropEvent dndEvent = null;
                String datasourceId = getDatasource();

                if(datasourceId != null) {
                    UIData datasource = findDatasource(context, this, datasourceId);
                    String[] idTokens = dragId.split(String.valueOf(UINamingContainer.getSeparatorChar(context)));
                    int rowIndex = Integer.parseInt(idTokens[idTokens.length - 2]);
                    datasource.setRowIndex(rowIndex);
                    Object data = datasource.getRowData();
                    datasource.setRowIndex(-1);

                    dndEvent = new DragDropEvent(this, behaviorEvent.getBehavior(), dragId, dropId, data);
                }
                else {
                    dndEvent = new DragDropEvent(this, behaviorEvent.getBehavior(), dragId, dropId);
                }

                super.queueEvent(dndEvent);
            }
           
View Full Code Here

                TreeNode oldParent = draggedNode.getParent();
                oldParent.getChildren().remove(draggedNode);
                droppedNode.addChild(draggedNode);

                //fire dragdrop event
                wrapperEvent = new DragDropEvent(this, behaviorEvent.getBehavior(), draggedNodeKey, droppedNodeKey);
                wrapperEvent.setPhaseId(behaviorEvent.getPhaseId());
            }
           
            super.queueEvent(wrapperEvent);
           
View Full Code Here

    String dropId = droppable.getParent().getClientId(facesContext);
   
    if(params.containsKey(dropId)) {
      String dragId = params.get("dragId");
     
      droppable.queueEvent(new DragDropEvent(droppable, dragId, dropId));
   
  }
View Full Code Here

    String dropId = droppable.getParent().getClientId(facesContext);
   
    if(params.containsKey(dropId)) {
      String dragId = params.get("dragId");
     
      droppable.queueEvent(new DragDropEvent(droppable, dragId, dropId));
   
  }
View Full Code Here

TOP

Related Classes of org.primefaces.event.DragDropEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.