Package org.richfaces.event

Examples of org.richfaces.event.DropEvent


            // TODO - log
            return;
        }

        AbstractDropTarget dropTarget = (AbstractDropTarget) component;
        new DropEvent(dropTarget, dropTarget.getDropValue(), dragSourceContextCallBack.getDragSource(),
            dragSourceContextCallBack.getDragValue()).queue();
    }
View Full Code Here


          new ContextCallbackWrapper(draggableDecoderContextCallback));
     
        Draggable draggable = draggableDecoderContextCallback.getDraggable();
        if (draggable != null) {
          if (draggableDecoderContextCallback.isValid()) {
            DropEvent dropEvent = new DropEvent(component);
            dropEvent.setDraggableSource(draggable);
            dropEvent.setDragType(draggableDecoderContextCallback.getDragType());
            dropEvent.setDragValue(draggableDecoderContextCallback.getDragValue());

            dropEvent.queue();
          } else {
            String text = MessageFormat.format(
                MISTYPED_DND_MESSAGE,
                new Object[] {
                    MessageUtil.getLabel(context, component),
View Full Code Here

      }
     
      Dropzone dropzone = (Dropzone) component;
     
      eventsExchanger.mailEvent(dragSourceId, component,
          context, new DropEvent(component), dropEventsCallback,
          dropzone.getAcceptedTypes(),
          dropzone.getDropValue(), false
      );
    }
  }
View Full Code Here

  public final void testQueueEventFacesEvent() {
    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(treeNode);
    DropEvent dropEvent = new DropEvent(treeNode);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(expandAllCommandEvent);
    treeNode.queueEvent(dragEvent);
    treeNode.queueEvent(dropEvent);

    assertEquals(PhaseId.INVOKE_APPLICATION, nodeExpandedEvent.getPhaseId());
    assertEquals(PhaseId.UPDATE_MODEL_VALUES, nodeSelectedEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, expandAllCommandEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, dragEvent.getPhaseId());
    assertEquals(PhaseId.INVOKE_APPLICATION, dropEvent.getPhaseId());
  }
View Full Code Here

    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(treeNode);
    DropEvent dropEvent = new DropEvent(treeNode);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(expandAllCommandEvent);
    treeNode.queueEvent(dragEvent);
    treeNode.queueEvent(dropEvent);

    assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeExpandedEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, nodeSelectedEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, expandAllCommandEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, dragEvent.getPhaseId());
    assertEquals(PhaseId.APPLY_REQUEST_VALUES, dropEvent.getPhaseId());
  }
View Full Code Here

    // ------------ Invoke listeners --------------------
    NodeExpandedEvent nodeExpandedEvent = new NodeExpandedEvent(tree);
    NodeSelectedEvent nodeSelectedEvent = new NodeSelectedEvent(tree, null);
    ExpandAllCommandEvent expandAllCommandEvent = new ExpandAllCommandEvent(tree);
    DragEvent dragEvent = new DragEvent(tree);
    DropEvent dropEvent = new DropEvent(tree);

    tree.queueEvent(nodeExpandedEvent);
    tree.queueEvent(dropEvent);
    tree.queueEvent(nodeSelectedEvent);
    tree.queueEvent(dragEvent);
View Full Code Here

  public void testDropEvent() {
    MockMethodBinding binding = new MockMethodBinding();
    treeNode.setDropListener(binding);
 
    DropEvent event = new DropEvent(treeNode);
    TreeEvents.invokeListenerBindings(treeNode, event, facesContext);

    Object[][] args = binding.getInvocationArgs();
    assertEquals(1, args.length);
    assertEquals(1, args[0].length);
View Full Code Here

          new ContextCallbackWrapper(draggableDecoderContextCallback));
     
        Draggable draggable = draggableDecoderContextCallback.getDraggable();
        if (draggable != null) {
          if (draggableDecoderContextCallback.isValid()) {
            DropEvent dropEvent = new DropEvent(component);
            dropEvent.setDraggableSource(draggable);
            dropEvent.setDragType(draggableDecoderContextCallback.getDragType());
            dropEvent.setDragValue(draggableDecoderContextCallback.getDragValue());

            dropEvent.queue();
          } else {
            String text = MessageFormat.format(
                MISTYPED_DND_MESSAGE,
                new Object[] {
                    MessageUtil.getLabel(context, component),
View Full Code Here

      }
     
      Dropzone dropzone = (Dropzone) component;
     
      eventsExchanger.mailEvent(dragSourceId, component,
          context, new DropEvent(component), dropEventsCallback,
          dropzone.getAcceptedTypes(),
          dropzone.getDropValue(), false
      );
    }
  }
View Full Code Here

      }
     
      Dropzone dropzone = (Dropzone) component;
     
      eventsExchanger.mailEvent(dragSourceId, component,
          context, new DropEvent(component), dropEventsCallback,
          dropzone.getAcceptedTypes(),
          dropzone.getDropValue(), false
      );
    }
  }
View Full Code Here

TOP

Related Classes of org.richfaces.event.DropEvent

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.