Examples of TreeRowKey


Examples of org.richfaces.model.TreeRowKey

  }

  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

Examples of org.richfaces.model.TreeRowKey

    // 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

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

Examples of org.richfaces.model.TreeRowKey

  }

  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

Examples of org.richfaces.model.TreeRowKey

    // 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

Examples of org.richfaces.model.TreeRowKey

      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

Examples of org.richfaces.model.TreeRowKey

   * @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

Examples of org.richfaces.model.TreeRowKey

   *
   * @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

Examples of org.richfaces.model.TreeRowKey

 
  /**
   * 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

Examples of org.richfaces.model.TreeRowKey

  }

  protected void doDecode(FacesContext context, UIComponent component) {
    UITreeNode node = (UITreeNode) component;
    UITree tree = node.getUITree();
    TreeRowKey key = (TreeRowKey) tree.getRowKey();
    Map requestMap = context.getExternalContext().getRequestParameterMap();
    String id = node.getClientId(context);
    TreeState componentState = (TreeState) tree.getComponentState();

    String nodeExpandedId = id + NODE_EXPANDED_INPUT_SUFFIX;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.