Package org.richfaces.model

Examples of org.richfaces.model.TreeRowKey


  }

  private void processAddNodeActionEvent(UITreeNode srcNode) {
//    log.info("StorageBackingBean processAddNodeActionEvent()");
      UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
      TreeRowKey dragNodeKey = (srcNode.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) srcNode.getDragValue() : null;
      TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
     
      log.info("dropped key: " + dragNodeKey);
     
      //add to list of selected properties
View Full Code Here


   
    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);
      
        //add to list of selected properties
View Full Code Here

      processAddNodeActionEvent(srcNode);
    }
   
    private void processAddNodeActionEvent(UITreeNode srcNode){
      UITree srcTree = srcNode != null ? srcNode.getUITree() : null;
      TreeRowKey dragNodeKey = (srcNode.getDragValue() instanceof TreeRowKey) ? (TreeRowKey) srcNode.getDragValue() : null;
      TreeNode draggedNode = dragNodeKey != null ? srcTree.getTreeNode(dragNodeKey) : null;
     
      log.debug("dropped key: "+dragNodeKey);
     
      //add to list of selected properties
View Full Code Here

          }

          Iterator<RowKeyHolder> ajaxKeysItr = holders.iterator();
          while (ajaxKeysItr.hasNext()) {
            RowKeyHolder keyHolder = ajaxKeysItr.next();
            TreeRowKey key = keyHolder.getRowKey();

            if (key != null && key.depth() == 0) {
              key = null;
            }

            tree.setRowKey(context, key);
View Full Code Here

  }

  protected String getSelectionValue(FacesContext context, UITree tree) {
    String result = "";
    TreeState treeState = (TreeState) tree.getComponentState();
    TreeRowKey selectedNodeKey = treeState.getSelectedNode();
    if (selectedNodeKey != null) {
      Object rowKey = tree.getRowKey();
      try {
        tree.setRowKey(selectedNodeKey);
        if (tree.isRowAvailable()) {
View Full Code Here

    // simple flag can be used here because
    // we cannot jump more than one level down until next node
    // when rendering
    Flag droppedDownToLevelFlag = new Flag();

    TreeRowKey rowKey = (TreeRowKey) key;

    //Object savedRowKey = input.getRowKey();
    try {
      input.captureOrigValue();
View Full Code Here

      if (!context.isExpanded() || !context.isHasChildren()) {
        getUtils().writeAttribute(writer, "style", "display: none;");
      } else {
        if (tree.isShowConnectingLines()) {
          TreeRowKey floatingKey = getFloatingKey();
          //need the expression only for AJAX update root
          if (floatingKey != null && floatingKey.equals(context.getRowKey())) {
            String expression = "background-image:expression(this.nextSibling ? '' : 'none')";
            getUtils().writeAttribute(writer, "style", expression);
          }
        }
      }
View Full Code Here

   * @param transferQueuedNodes whether to collect queued expanded nodes states or not
   * @return tree node state
   */
  public Object getTreeNodeState() {
    // Check for node were choosed
    TreeRowKey rowKey = (TreeRowKey) getRowKey();
    if (rowKey == null) {
      return null;
    }
    TreeState state = (TreeState) getComponentState();
    return state.getSubState(rowKey);
View Full Code Here

   *
   * @param state node state to apply.
   */
  public void setTreeNodeState(Object state) {
    // Check for node were choosed
        TreeRowKey rowKey = (TreeRowKey) getRowKey();
    if (rowKey == null) {
      return;
    }
   
    if (state instanceof TreeState) {
View Full Code Here

 
  /**
   * Cleanup current tree node state information.
   */
  public void clearTreeNodeState() {
    TreeRowKey rowKey = (TreeRowKey) getRowKey();
    if (rowKey == null) {
      return;
    }
   
    TreeState state = (TreeState) getComponentState();
View Full Code Here

TOP

Related Classes of org.richfaces.model.TreeRowKey

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.