Results 1 to 3 of 3

Thread: How to load ChildNodes from database

  1. #1

    Default How to load ChildNodes from database

    I have 2 columns table column like Product Name ,Product description , I can displaying 1st columns values as Parent Nodes now I would like to Show 2nd Column as Child Node each parent Node .Example :Root ->Sony ->Sony Desc ->Nokia ->Nokia Desc I am using ExtJS Treepanel , SpringMVC with Oracle Database please let me know how could I show Child Nodes ?

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    I'm having trouble understanding your request. Can you explain a bit more about what you are trying to accomplish? Have you seen the tree examples in the docs?
    http://dev.sencha.com/deploy/ext-3.4...ples/#sample-8

  3. #3

    Default How to Populate TreePanel with Server Side Spring MVC

    HTML Code:
    Hey Gary Thanks for replied me . I would like to popup treepanel based on database table column1 as a Parent Node and Column2 as a Child Node using server side spring mvc?
    My Table like
    Column -1(Item) Column-2(Desc)
    Sony Sony Desc
    Lenovo Lenovo Desc
    Iphone Iphone Desc
    Code:
    //Server Side Spring MVC
    My TreeNode Java Class variables are 
    int id , String text , String item ,String Desc ,Boolean leaf =false, List<TreeNode> child ;
    //getter and Setter
    
    @RequestMapping(value="/.getExport")
    protected @RespnseBody getExport(){
    //Here I am writing list Tree Node but Child node I cannot get it ?
    List<TreeNode> list = new ArrayList<TreeNode>();
    List<TreeNode> listItem = treeNodeService.getAll();
    for(TreeNode treenode:listItem){
    
    //here I would like to add Child Node how could I add each Column1 Parent  Item column as Child Desc Column2 could you please let me know or any mistaken made let me know ?
    
    }

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •