Package org.richfaces.component

Examples of org.richfaces.component.UITreeNode


    }

    public void dropListener(DropEvent dropEvent) {

  // resolve drag destination attributes
  UITreeNode destNode = (dropEvent.getSource() instanceof UITreeNode) ? (UITreeNode) dropEvent.getSource() : null;
  UITree destTree = destNode != null ? destNode.getUITree() : null;
  TreeRowKey dropNodeKey = (dropEvent.getDropValue() instanceof TreeRowKey) ? (TreeRowKey) dropEvent.getDropValue() : null;
  TreeNode droppedInNode = dropNodeKey != null ? destTree.getTreeNode(dropNodeKey) : null;

  // resolve drag source attributes
  UITreeNode srcNode = (dropEvent.getDraggableSource() instanceof UITreeNode) ? (UITreeNode) dropEvent.getDraggableSource() : null;
  UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
  TreeRowKey dragNodeKey = (dropEvent.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) dropEvent.getDragValue() : null;
  TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
  if (dropEvent.getDraggableSource() instanceof UIDragSupport && srcTree == null && draggedNode == null && dropEvent.getDragValue() instanceof TreeNode) {     
      srcTree = destTree;
      draggedNode = (TreeNode) dropEvent.getDragValue();
View Full Code Here


  }

  public void processDrop(DropEvent dropEvent) {
//    log.info("StorageBackingBean processDrop()");
      // resolve drag source attributes
        UITreeNode srcNode = (dropEvent.getDraggableSource() instanceof UITreeNode) ? (UITreeNode) dropEvent.getDraggableSource() : null;
        UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
        TreeRowKey dragNodeKey = (dropEvent.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) dropEvent.getDragValue() : null;
        TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
       
        log.info("dropped key: " + dragNodeKey);
      
View Full Code Here

    return Boolean.TRUE;
  }

  public void processPropertyDblClick(ActionEvent event) {
//    log.info("StorageBackingBean processPropertyDblClick()");
    UITreeNode srcNode = (event.getComponent().getParent() instanceof UITreeNode) ? (UITreeNode) event
        .getComponent().getParent()
        : null;
    processAddNodeActionEvent(srcNode);
  }
View Full Code Here

  }


  public void processLeafContextMenuAddProperty(ActionEvent event) {
//    log.info("StorageBackingBean processLeafContextMenuAddProperty()");
      UITreeNode srcNode = (event.getComponent().getParent().getParent()instanceof UITreeNode) ?
          (UITreeNode) event.getComponent().getParent().getParent() : null;
      processAddNodeActionEvent(srcNode);
      }
View Full Code Here

      this.cbx = cbx;
    }
   
    public void processDrop(DropEvent dropEvent) {
      // resolve drag source attributes
        UITreeNode srcNode = (dropEvent.getDraggableSource() instanceof UITreeNode) ? (UITreeNode) dropEvent.getDraggableSource() : null;
        UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
        TreeRowKey dragNodeKey = (dropEvent.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) dropEvent.getDragValue() : null;
        TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
       
        log.debug("dropped key: "+dragNodeKey);
      
View Full Code Here

        if(draggedNode!=null)
          this.dndSelNodes.put(((OntologyProperty)draggedNode.getData()).getURI(),draggedNode);
    }
   
    public void processPropertyDblClick(ActionEvent event){
      UITreeNode srcNode = (event.getComponent().getParent()instanceof UITreeNode) ? (UITreeNode) event.getComponent().getParent() : null;
      processAddNodeActionEvent(srcNode);
    }
View Full Code Here

     * https://cloud.prod.atl2.jboss.com:8443/jira/browse/RF-2516;jsessionid=146683782496939F59F8D6156B35AA9F?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
     * --> fixed, need to update version of RichFaces
     * @param event
     */
    public void processLeafContextMenuAddProperty(ActionEvent event){
      UITreeNode srcNode = (event.getComponent().getParent().getParent()instanceof UITreeNode) ? (UITreeNode) event.getComponent().getParent().getParent() : null;
      processAddNodeActionEvent(srcNode);
    }
View Full Code Here

          if (currentKey == null ? rowKey != null : !currentKey.equals(rowKey)) {
            //currentKey NE rowKey
            input.setRowKey(context, rowKey);
          }

          UITreeNode nodeFacet = input.getNodeFacet();
          if (!nodeFacet.isRendered()) {
            return false;
          }

          return stateRange.processNode(rowKey);
        }
View Full Code Here

        c.setHasChildren(false);
        navigator.openDiv(c);
        navigator.closeDiv();
      }

      UITreeNode nodeFacet = tree.getNodeFacet();
      Object oldAttrValue = nodeFacet.getAttributes().get("isLastElement");
      Object oldAjaxRootAttrValue = nodeFacet.getAttributes().get("isAjaxUpdateRoot");
      try {
        nodeFacet.getAttributes().put("isLastElement", new Boolean(isLastElement));
        nodeFacet.getAttributes().put("isAjaxUpdateRoot", new Boolean(floatingKey != null && floatingKey.equals(rowKey)));
        ResponseWriter writer = context.getResponseWriter();
        if (isLastElement && this.navigator.showLines) {
          writer.startElement("p", tree);
          writer.writeAttribute("class", "rich-tree-last-node-marker", null);
          writer.endElement("p");
        }

        renderChild(context, nodeFacet);


        c = new Context();
        c.setClientId(nodeFacet.getClientId(context) + NamingContainer.SEPARATOR_CHAR);
        c.setLast(this.isLastElement);
        c.setExpanded(tree.isExpanded());
        c.setRowKey(tree.getRowKey());
        flag.setContext(c);

        //writer.write("** after renderChild **");
        //navigator.openDiv();
      } finally {
        if (oldAttrValue != null) {
          nodeFacet.getAttributes().put("isLastElement", oldAttrValue);
        } else {
          nodeFacet.getAttributes().remove("isLastElement");
        }

        if (oldAjaxRootAttrValue != null) {
          nodeFacet.getAttributes().put("isAjaxUpdateRoot", oldAjaxRootAttrValue);
        } else {
          nodeFacet.getAttributes().remove("isAjaxUpdateRoot");
        }
      }
    }
View Full Code Here

    } else {
      script.append("fireExpansionEvent();");
    }
   
    if (UITree.SWITCH_AJAX.equals(tree.getSwitchType())) {
      UITreeNode nodeFacet = tree.getNodeFacet();
      JSFunction function = AjaxRendererUtils.buildAjaxFunction(nodeFacet,
          context);
      Map<String, Object> eventOptions = AjaxRendererUtils.buildEventOptions(context,
          nodeFacet, true);
      Map<String, Object> parameters = (Map<String, Object>) eventOptions.get("parameters");
View Full Code Here

TOP

Related Classes of org.richfaces.component.UITreeNode

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.