1. #31
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Default


    I tried the load the ExtDirectSample. All examples work, except the upload form.

    Question: how can I load a form?

    Without Direct I used:

    Code:
     
    listeners:{
       'render': {
          fn:loadForm,
          scope:this
    }}
    Code:
     
    function loadForm(form){
       switch (form){
          case myform:
          form.getForm().load({
          url:'myform.ashx?a=spi',
          method:'post',
          waitMsg:'Loading...'
        }) 
        break;
    }
    Can someone provide me an example? Thanks!

  2. #32
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,909
    Vote Rating
    626
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Not sure what you mean, I just tried it using the example code and I can get the file uploaded no problem.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  3. #33
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Default


    Quote Originally Posted by evant View Post
    Not sure what you mean, I just tried it using the example code and I can get the file uploaded no problem.
    I will check the upload form example in more detail later today.

    Any ideas / answers regarding my question?
    I can write a funtion that retuns the form data from a database, but how do I load the form / how do I connect the extjs form to the 'direct' function?

  4. #34
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,909
    Vote Rating
    626
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #35
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Default


    I have checked all the direct examples and are still not able to change your example in such a way that it load a form.

    In your next release, is it an idea that you extend your examples with an load function for forms?

    In the future I hope to work with grids, paging, and extra parameters... but first simple forms.

    Thank you very much!

  6. #36
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,909
    Vote Rating
    626
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Hi All,

    The router in the main post has been updated, which includes:

    1) New sample of using Ext direct to load and submit forms.
    2) Fixed an issue setting the content type of responses when uploading files. Also added extra code to this sample to show how to return info from a file upload.
    3) Updated the code in the example to use Ext 3.0 final (which fixes a few bugs).

    Enjoy.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  7. #37
    Sencha User Gunmen's Avatar
    Join Date
    Jul 2007
    Posts
    305
    Vote Rating
    0
    Gunmen is on a distinguished road

      0  

    Thumbs up


    Quote Originally Posted by evant View Post
    Hi All,

    The router in the main post has been updated, which includes:

    1) New sample of using Ext direct to load and submit forms.
    2) Fixed an issue setting the content type of responses when uploading files. Also added extra code to this sample to show how to return info from a file upload.
    3) Updated the code in the example to use Ext 3.0 final (which fixes a few bugs).

    Enjoy.
    Evan, thank you!

    I'm on my way to check it out!

  8. #38
    Ext User
    Join Date
    Jul 2009
    Posts
    6
    Vote Rating
    0
    ooNxt is on a distinguished road

      0  

    Default Nice~

    Nice~


    THX a lot,evan.
    Is there a example about editgrid?

  9. #39
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,909
    Vote Rating
    626
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Not a .NET one, but there's a PHP version in the 3.0 examples, it should be trivial to move it over.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  10. #40
    Ext User Dave.Sanders's Avatar
    Join Date
    Mar 2008
    Posts
    131
    Vote Rating
    0
    Dave.Sanders is on a distinguished road

      0  

    Default


    Hi Evan,

    It looks like its your router that is packaged in the Ext.Direct download, correct?

    If so, I have a few additions that I've made today based on the latest in that download. Specifically:

    1. I've made it handle and send out exceptions.
    2. I've made it handle and sent out events.
    3. I've made it so that if a method returns a List<>, each object in the list turns into a response.

    The third one may only be useful to me. The case was that I wanted to be able to return the data from the method AND call an event easily. However, in practice while this makes your events nice and maintainable, it might not be useful since it seems that events ALWAYS get called last - so you can't rely on an event being called which might affect how you handle your response.

    Would these additions be useful to anyone, and if so, how do you want me to post them up here? (there are a number of changes, so it might not be useful to just post up the code bits.)