Package org.richfaces.component

Examples of org.richfaces.component.UITreeNode


    } 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);
      Map<Object, Object> parameters = (Map<Object, Object>) eventOptions.get("parameters");
View Full Code Here


  public String getExpandedValue(FacesContext context, UITreeNode node) {
    return Boolean.toString(node.getUITree().isExpanded());
  }

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

    String nodeExpandedId = id + NODE_EXPANDED_INPUT_SUFFIX;
    Object nodeExpandedValue = requestMap.get(nodeExpandedId);
    if (nodeExpandedValue != null) {
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", "dr-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

          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

          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", "dr-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(this);");
    }
   
    if (UITree.SWITCH_AJAX.equals(tree.getSwitchType())) {
      UITreeNode nodeFacet = tree.getNodeFacet();
      JSFunction function = AjaxRendererUtils.buildAjaxFunction(nodeFacet,
          context);
      Map eventOptions = AjaxRendererUtils.buildEventOptions(context,
          nodeFacet);
      Map parameters = (Map) eventOptions.get("parameters");
View Full Code Here

  public String getExpandedValue(FacesContext context, UITreeNode node) {
    return Boolean.toString(node.getUITree().isExpanded());
  }

  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;
    Object nodeExpandedValue = requestMap.get(nodeExpandedId);
    if (nodeExpandedValue != null) {
View Full Code Here

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

  public String getExpandedValue(FacesContext context, UITreeNode node) {
    return Boolean.toString(node.getUITree().isExpanded());
  }

  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;
    Object nodeExpandedValue = requestMap.get(nodeExpandedId);
    if (nodeExpandedValue != null) {
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.