Page 1 of 4 123 ... LastLast
Results 1 to 10 of 165

Thread: Ext.ux.tree.RemoteTreePanel

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default Ext.ux.tree.RemoteTreePanel

    I'm right now developing a taxonomy system and I was in need of a tree that would be stored at server with UI at client - I think quite common requirement, right? I've done it already before for various trees, e.g. my FileTreePanel.

    I've been too lazy to write the same code again and again so I put all basic operations into extension: Ext.ux.tree.RemoteTreePanel. The extension doesn't change appearance or behavior of the standard Ext.tree.TreePanel too much but it implements the following logic:

    1. User makes a change of the tree (create node, rename node, delete node, D&D node)
    2. Request is sent to server to execute, save this change.
    3.a) Update GUI on success
    3.b) Revert GUI to previous state on failure + display error message delivered from server.

    If you're interested see live demo at http://remotetree.extjs.eu

    All your comments, bug reports or ideas for improvements are welcome.

    Note: I cannot publish the backend of the example so it makes no sense to ask me for it. Of course, you are free to analyze what is sent to the server and what comes back and to implement your own server solution.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  2. #2
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    0
      0  

    Default

    Hi Jsakalos,

    http://remotetree.extjs.eu not work!

    Greetings,

  3. #3
    Ext User
    Join Date
    Oct 2008
    Posts
    11
    Vote Rating
    0
      0  

    Default

    great extend
    thanks very much!
    this is just I needed

  4. #4
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    It must had been some temporary problem - does it work now?
    Quote Originally Posted by galdaka View Post
    Hi Jsakalos,

    http://remotetree.extjs.eu not work!

    Greetings,
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  5. #5
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by jsakalos View Post
    It must had been some temporary problem - does it work now?
    Oh yes. Thanks!!


  6. #6
    Sencha User
    Join Date
    Feb 2008
    Posts
    194
    Vote Rating
    -1
      0  

    Default

    @jsakalos

    Nice example.

    Can you tell how does your example handle multi-user environment. For example if multiple people have tree loaded, then one makes a change on an already altered tree structure by someone else?

    Also, if you can share, how did you manage hierarchical data in the background... and why did you choose this aproach. Standard "adjucency model" or a bit more advanced nested set model?

    Thanks again!

  7. #7
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    There is no special logic for MU environment implemented at client side.

    I don't know what's "adjucency model". I use principle similar to this: http://www.sitepoint.com/article/hie...ta-database/2/ enhanced by myself.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  8. #8
    Ext User Minnow's Avatar
    Join Date
    Mar 2008
    Posts
    17
    Vote Rating
    1
      0  

    Default Insert not rolled back

    Hey - cool toy.

    You need to insert the following at line 476

    case 'insertChild':

    so that it reads:

    PHP Code:
    if(true !== o.success) {
        
    this.showError(o.error || o.errors);
        switch(
    options.action) {
            case 
    'appendChild':
            case 
    'insertChild':
                
    options.node.parentNode.removeChild(options.node);
            break;
            default:
            break;
        }
        return;


  9. #9
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Node stays on error?
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  10. #10
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Vote Rating
    403
      0  

    Default

    Oh, yes, now I remember. I've added insertChild later and forgotten to put it here. Thank you for pointing out.
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


Page 1 of 4 123 ... LastLast

Posting Permissions

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