Package org.richfaces.model

Examples of org.richfaces.model.TreeRowKey


          if (ajaxKeys != null) {
            List sortedKeys = new ArrayList(ajaxKeys.size());
            sortedKeys.addAll(ajaxKeys);
            Collections.sort(sortedKeys, treeRowKeyComparator);
            Iterator ajaxKeysItr = sortedKeys.iterator();
            TreeRowKey lastKey = null;
            boolean nullRoot = false;

            while (!nullRoot && ajaxKeysItr.hasNext()) {
              TreeRowKey key = (TreeRowKey) ajaxKeysItr.next();

              if (lastKey == null) {
                lastKey = key;
              } else {
                if (!lastKey.isSubKey(key)) {
                  lastKey = key;
                } else {
                  //skip nodes that's parent nodes have been rendered
                  continue;
                }
              }

              if (key == null || key.depth() == 0) {
                nullRoot = true;
                key = null;
              }

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


  }

  public String encodeSelectionStateInput(FacesContext context, UITree tree) throws IOException {
    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

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.