Question

We are working on SmartGWT 2.2, and Struts2.

I have created a sample form(DynamicForm) which asks to upload file and mapped action class for processing file upload.

I have setup form.setCanSubmit(true);

My call is succefully gets transferred to struts action class and file is getting uploaded also.

struts.xml

<action name="FileUploadAction" class="FileUploadAction" >
<result name="success" type="redirect">success</result>
</action>

But the problem is that control is not getting back to...

form.submit(new DSCallback(){

@Override
public void execute(DSResponse response, Object rawData,
DSRequest request) {
System.out.println("Response: " + response.getHttpResponseCode());
SC.say("back");
System.out.println("BACK...........");
}
});

I read in Smartgwt, Dynamic Form API that, if this.canSubmit is true, callback is ignored..

As, we are not using DataSource, I have to use this.canSubmit to true. Response from ActionClass gets struck at 'http://127.0.0.1:8888/success'

So, what is an alternate solution?

Was it helpful?

Solution

you can use hidden iframe and JSNI call that hidden iframe from your server action class....

Thank you.

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