Results 1 to 8 of 8

Thread: How to know if FormPanel Submit was successul?

  1. #1
    Ext User
    Join Date
    May 2009
    Posts
    21
    Vote Rating
    0
      0  

    Default How to know if FormPanel Submit was successul?

    I saw many posts about fileuploading withe ext-gwt
    It works fine so far!
    but, I'm wondering how I can react on a successful uploading of the file? I don't have any callback or something! Is there a mechanism to react of a successful submit() ?


    i tryed in the FormPanel:

    this.setMethod(Method.POST);
    this.setEncoding(Encoding.MULTIPART);
    this.setAction(fileUploadAction);

    this.addListener(Events.Submit, new Listener<FormEvent>() {
    public void handleEvent(FormEvent arg0) {
    MessageBox.alert("File submited");
    //do something

    }
    }
    but it did not work....any help?

  2. #2
    Ext User
    Join Date
    Mar 2008
    Posts
    15
    Vote Rating
    0
      0  

    Default

    It seems that a lot of people were concerned about this issue.

  3. #3
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
      0  

    Default same for me mate...

    Hi,
    There is a thread about that but unfortunately no answer was given so far. If one of you guys solve that please write the solution here so we can get on with our lives

    cheers!

  4. #4
    Ext GWT Premium Member
    Join Date
    Sep 2009
    Posts
    60
    Vote Rating
    1
      0  

    Default same issue

    Any update?

  5. #5
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by aclsoftware
    Any update?
    not really, but you can take a look at a more promissing discussions here:

    http://extjs.com/forum/showthread.ph...d=1#post376726

  6. #6
    Ext User
    Join Date
    Nov 2008
    Posts
    44
    Vote Rating
    0
      0  

    Default

    Telling whether it succeeded or not is tied in with getting a file upload progress bar working. To do so your fileupload servlet has to be constantly responding with messages (telling how far its progressing) and thus will respond on success also. Then you can go about telling whether it succeeded or not.
    Presumably at the moment your servlet just takes the file and stores it. Get a progress bar working and you've got your success status too. Was playing about with this back in GWT1.5 GXT1.2 and there were people on the forum who had it working (but few discussions properly explaining it). I gave up in the end, but I found java servlet forums were a far better place to look for how to get your servlet to talk about how the upload was going.

    In other words - search for getting a working progress bar on fileuploads, not for telling when the file is finished.

  7. #7
    Ext Premium Member
    Join Date
    Aug 2009
    Posts
    29
    Vote Rating
    0
      0  

    Smile

    hello there Feltros,
    Quote Originally Posted by Feltros View Post
    I gave up in the end, but I found java servlet forums were a far better place to look for how to get your servlet to talk about how the upload was going.

    In other words - search for getting a working progress bar on fileuploads, not for telling when the file is finished.
    that's a great advice, although it seems very strange that extjs have the proper event to treat this situation (meaning that you shouldn't need a progress bar in order to make this thing work). Still, if you have some servlet that does the job and if you can share its code would be awesome.

    thanks a lot!
    cheers!

  8. #8
    Ext User
    Join Date
    Nov 2008
    Posts
    44
    Vote Rating
    0
      0  

    Default

    Unfortunately not, as I said I gave up with things and got rid of the extraneous code. Would love to see a full tutorial on it oneday though.

Posting Permissions

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