Package org.richfaces.event

Examples of org.richfaces.event.NodeExpandedEvent


        if (Boolean.valueOf((String) requestMap.get(id + AJAX_EXPANDED_SUFFIX)).booleanValue()) {
          new AjaxExpandedEvent(node).queue();
          new AjaxExpandedEvent(tree).queue();
        } else {
          new NodeExpandedEvent(node).queue();
          new NodeExpandedEvent(tree).queue();
        }
      }
    }

    if (id.equals(tree.getAttributes()
View Full Code Here


        if (Boolean.valueOf((String) requestMap.get(id + AJAX_EXPANDED_SUFFIX)).booleanValue()) {
          new AjaxExpandedEvent(node).queue();
          new AjaxExpandedEvent(tree).queue();
        } else {
          new NodeExpandedEvent(node).queue();
          new NodeExpandedEvent(tree).queue();
        }
      }
    }

    if (id.equals(tree.getAttributes()
View Full Code Here

        if (Boolean.valueOf((String) requestMap.get(id + AJAX_EXPANDED_SUFFIX)).booleanValue()) {
          new AjaxExpandedEvent(node).queue();
          new AjaxExpandedEvent(tree).queue();
        } else {
          new NodeExpandedEvent(node).queue();
          new NodeExpandedEvent(tree).queue();
        }
      }
    }

    if (id.equals(tree.getAttributes()
View Full Code Here

  /**
   * Test method for {@link org.richfaces.component.UITree#queueEvent(javax.faces.event.FacesEvent)}.
   */
  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

   * Test method for {@link org.richfaces.component.UITree#queueEvent(javax.faces.event.FacesEvent)}.
   */
  public final void testQueueEventFacesEventImmediate() {
    tree.setImmediate(true);

    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

    treeNode.addDragListener(dragListener);
    assertTrue(tree.getDropListeners().length == 1);
    assertTrue(treeNode.getDropListeners().length == 1);

    // ------------ 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);
View Full Code Here

    this.source = null;
  }
 
  public void testNodeExpandedListener() {
    NodeExpandedEvent event = new NodeExpandedEvent(source);
   
    ExpandListener listener = new ExpandListener();
   
    assertTrue(event.isAppropriateListener(listener));
    assertFalse(event.isAppropriateListener(new FacesListener(){
     
    }));

    event.processListener(listener);
   
    assertSame(event, listener.getEvent());
  }
View Full Code Here

 
  public void testNodeExpansionEvent() {
    MockMethodBinding binding = new MockMethodBinding();
    treeNode.setChangeExpandListener(binding);
 
    NodeExpandedEvent event = new NodeExpandedEvent(treeNode);
    TreeEvents.invokeListenerBindings(treeNode, event, facesContext);

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

        if (Boolean.valueOf((String) requestMap.get(id + AJAX_EXPANDED_SUFFIX))) {
          new AjaxExpandedEvent(node).queue();
          new AjaxExpandedEvent(tree).queue();
        } else {
          new NodeExpandedEvent(node).queue();
          new NodeExpandedEvent(tree).queue();
        }
      }
    }

    if (id.equals(tree.getAttributes().get(UITree.SELECTION_INPUT_ATTRIBUTE))) {
View Full Code Here

        if (Boolean.valueOf((String) requestMap.get(id + AJAX_EXPANDED_SUFFIX)).booleanValue()) {
          new AjaxExpandedEvent(node).queue();
          new AjaxExpandedEvent(tree).queue();
        } else {
          new NodeExpandedEvent(node).queue();
          new NodeExpandedEvent(tree).queue();
        }
      }
    }

    if (id.equals(tree.getAttributes()
View Full Code Here

TOP

Related Classes of org.richfaces.event.NodeExpandedEvent

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.