Question

I'm new to SmartGWT. I'm using SmartGWT(LGPL) 2.2 with FF 3.6. I've done the file upload module in my GWT-Ext project successfully. In that I was using a FormPanel & a FileUpload control. After the file is uploaded I handled the event like this:

Code:

formPanel.addFormListener(new FormListenerAdapter(){

   @Override
   public void onActionComplete(Form form, int httpStatus,
     String responseText) {
    MessageBox.alert("Succesful");
   }
   @Override
   public void onActionFailed(Form form, int httpStatus,
     String responseText) {
    MessageBox.alert("Failed");
   }

  });

I used Struts to send request to my Action Class & redirect it back to the listener like this:

Code:

 <package name="default" extends="struts-default">
  <action name="FileUploadAction" class="com.nextenders.server.actions.FileUploadAction" >
    <result name="success" type="redirect">SUCCESS</result>
   <result name="fail">FAIL</result>
   <result name="none">NONE</result>
   <result name="blank">BLANK</result>
   <result name="size">SIZE</result>
  </action>
 </package>

I'm using DynamicForm and UploadItem of SmartGWT. can anyone tell me if there is a similar functionality like formPanel.addFormListener() in DynamicForm of SmartGWT?

Was it helpful?

Solution

There is no in built callback available for this. You need to create some code to implement callback feature.

You can get some idea

http://forums.smartclient.com/showthread.php?t=5477

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top