Package com.gwtext.client.data

Examples of com.gwtext.client.data.NodeModel


                                final JavaScriptObject failure,
                                final JavaScriptObject callback, String params) {

      if(asyncCallback == null) return;
     
      NodeModel nodeModelRoot = root.getNodeModel();
      if(nodeModelRoot == null) nodeModelRoot = new NodeModel(root);
     
        try {
          asyncCallback.getTreeNodeModel(nodeModelRoot, new AsyncCallback(){

        public void onFailure(Throwable caught) {
View Full Code Here


    List result = (List)serverResult;
    String coldata[] = treeLoader.columnDataName;
   
//    beginUpdate(currentNode);
    for (Iterator iterator = result.iterator(); iterator.hasNext();) {
      NodeModel curModel = (NodeModel) iterator.next();
      curModel.setColumnDataName(coldata);
      currentNode.appendChild(createNode(treeLoader, coldata, curModel, true));
      /* no need to add the model child to the model parent since the
       * treepanel listener for the model will do just that...
       */
      //if(currentNode.getNodeModel() != null)
View Full Code Here

  }
 
  private static JavaScriptObject createNode(final JavaScriptObject treeLoaderJS, final TreeNode root,
            final NodeModelTreeLoader treeLoader){
    String coldata[] = treeLoader.columnDataName;
    NodeModel nodeModel = new NodeModel(root);

    return createNode(treeLoader, coldata, nodeModel, true).getJsObj();
   
  }
View Full Code Here

          }
      );
    }-*/;
   
    protected void appendToModel(TreeNode parent, TreeNode node, int index){
      NodeModel nodeModel = parent.getNodeModel();
      if(nodeModel != null)
        nodeModel.addChild(node.getNodeModel(), index,true);
    }
View Full Code Here

   
    protected void insertToModel(TreeNode parent, TreeNode child, TreeNode refNode){
      Node node[] = parent.getChildNodes();
      for (int i = 0; i < node.length; i++) {
      if(node[i].getId() == refNode.getId()){
          NodeModel nodeModel = parent.getNodeModel();
          if(nodeModel != null)
            nodeModel.addChild(child.getNodeModel(), i, true);
          break;
      }
    }
    }
View Full Code Here

      }
    }
    }
   
    protected void removeFromModel(TreeNode parent, TreeNode node){
      NodeModel nodeModel = parent.getNodeModel();
      if(nodeModel != null)
        nodeModel.remove(node.getNodeModel(), true);
    }
View Full Code Here

      if(displayRoot){
        JavaScriptObjectHelper.setArrayValue(childrenArray, 0, nodeModel.getJsonVersion());
      } else{
        if(nodeModel.getChildSize() > 0){
          for (int i = 0; i < nodeModel.getChildSize(); i++) {
            NodeModel curChild = nodeModel.getChild(i);
            JavaScriptObjectHelper.setArrayValue(childrenArray, i, curChild.getJsonVersion());
          }
        }
      }
      setChildren(childrenArray);
    }
View Full Code Here

                                final JavaScriptObject failure,
                                final JavaScriptObject callback, String params) {

      if(asyncCallback == null) return;
     
      NodeModel nodeModelRoot = root.getNodeModel();
      if(nodeModelRoot == null) nodeModelRoot = new NodeModel(root);
     
        try {
          asyncCallback.getTreeNodeModel(nodeModelRoot, new AsyncCallback(){

        public void onFailure(Throwable caught) {
View Full Code Here

    List result = (List)serverResult;
    String coldata[] = treeLoader.columnDataName;
   
//    beginUpdate(currentNode);
    for (Iterator iterator = result.iterator(); iterator.hasNext();) {
      NodeModel curModel = (NodeModel) iterator.next();
      curModel.setColumnDataName(coldata);
      currentNode.appendChild(createNode(treeLoader, coldata, curModel, true));
      /* no need to add the model child to the model parent since the
       * treepanel listener for the model will do just that...
       */
      //if(currentNode.getNodeModel() != null)
View Full Code Here

  }
 
  private static JavaScriptObject createNode(final JavaScriptObject treeLoaderJS, final TreeNode root,
            final NodeModelTreeLoader treeLoader){
    String coldata[] = treeLoader.columnDataName;
    NodeModel nodeModel = new NodeModel(root);

    return createNode(treeLoader, coldata, nodeModel, true).getJsObj();
   
  }
View Full Code Here

TOP

Related Classes of com.gwtext.client.data.NodeModel

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.