Page 26 of 84 FirstFirst ... 1624252627283676 ... LastLast
Results 251 to 260 of 837

Thread: [Beta 1] Saki's FileTree for Ext 2.0

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

    Default

    Take a look at the function onContextClick, that should be the only one you need to override.
    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. #252
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    379
    Vote Rating
    2
      0  

    Default

    Firstly - thanks for a fantastic plugin!

    I've managed to get the FileTree working with a PHP backend, all the
    various features are working OK. I can upload files, rename them,
    create folders, delete, etc, however, I'm just getting a bit stuck
    on the download side.

    Just as a simple start, I'd like to download a file and display it in a window,
    the file could just be text say.

    I can see that on using Open->Download the FileTree POSTs with
    cmd = 'download' and path='name of file', I didnt get any response
    with Open though.

    however, not sure what I should do at this point. Do I return the file
    in JSON format, etc. How do I overload the 'open' and 'download'
    etc events to say open a simple window with the file contents. I'd
    prefer to do this without changing URL.

    If you could give me a start on that it would be great.

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

    Default

    You should return plain file data, not json encoded, with proper headers (content-disposition).
    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


  4. #254
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    379
    Vote Rating
    2
      0  

    Default

    I'd like to return the data in AJAX style though, for example it would
    be nice to open data in a separate window, perhaps a splitter on the
    TreePanel window.

    However when I click on Open in the menu, I dont get a message passed
    through to the server just the request for the URL. I'd like to change
    this to a 'getfile' type command, and return the data in JSON format
    say.

    Thanks

    Ian.

  5. #255
    Ext User
    Join Date
    Apr 2008
    Posts
    56
    Vote Rating
    0
      0  

    Default

    Saki, is there a reason why I can't force the initial request from FileTreePanel to be a 'get'? I am passing in method:'get', yet when I look in FireBug I see that it sends a POST (i guess that's default). is there anything else I need to do? thanks a lot.

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

    Default

    Quote Originally Posted by silcreval View Post
    I'd like to return the data in AJAX style though, for example it would
    be nice to open data in a separate window, perhaps a splitter on the
    TreePanel window.

    However when I click on Open in the menu, I dont get a message passed
    through to the server just the request for the URL. I'd like to change
    this to a 'getfile' type command, and return the data in JSON format
    say.

    Thanks

    Ian.
    If you want a different open behavior you need to override openNode function of FileTreePanel.
    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


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

    Default

    Quote Originally Posted by bomka View Post
    Saki, is there a reason why I can't force the initial request from FileTreePanel to be a 'get'? I am passing in method:'get', yet when I look in FireBug I see that it sends a POST (i guess that's default). is there anything else I need to do? thanks a lot.
    Try to put there GET in uppercase letters. However, I recommend against using get method.
    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. #258
    Ext User
    Join Date
    Apr 2008
    Posts
    56
    Vote Rating
    0
      0  

    Default

    Saki, is there a specific reason why you prefer "POST'? I am using Ruby on Rails and wish to stick to the 7 actions that REST provides (same URL with GET gives me a index action, wheereas with POST gives me create action). Anyway, I will try the capitalized 'GET' and let you know. thanks.

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

    Default

    GET size is limited and it is insecure.
    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. #260
    Ext JS Premium Member
    Join Date
    Jan 2008
    Posts
    379
    Vote Rating
    2
      0  

    Default

    Hi Saki,

    Thanks. I'm on a fairly steep learning curve here, I've got to grips somewhat with
    ExtJs, but message/action passing still escapes me.

    Could you show me how I would override the openNode behaviour. Do I subclass
    FileTreePanel, and add a 'listener'?

    I wanted to add some buttons to a toolbar which talked to the FileTreePanel, but
    I had to call functions directly in the FileTreePanel to get it to work.

    Thanks.

Page 26 of 84 FirstFirst ... 1624252627283676 ... 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
  •