SmartClient Version: v9.0p_2013-11-03/PowerEdition
Browsers: Chrome 33, safari 5.1.7
We are seeing this issue on chorme and safari browsers. IE works fine.
We have a dynamic form with multiple text fields and one field to upload csv files as follows.
{
name: "file",
required: true,
width: 250,
type: "binary",
colSpan: 3
}
We throw parsing Exception in the server, if the uploaded file is not a csv file and set status as 100 and return a message.
In the saveData call back we look for the status code and display the error message as shown below. Once we close the message window, we clear the values and the empty form is displayed.
this.form.saveData(
function(dsResponse, data, dsRequest) {
if(dsResponse.status==100||dsResponse.status==-4){
isc.say(data); windowRef.uploadDynamicForm.clearValues();
}else { //we display a grid.}
}
, {
params: {
}
});
Now if we try to upload the correct csv file and submit, all the values except the file data is available in the server.
As you see, the way we are handling the error in the form is by catching an exception on the server
catch (ParseException e) {
log.error("Issue with uploading file", e);
dsResponse.setData(ERROR_MSG);
dsResponse.setStatus(100);
}
By doing this are we missing anything (clearing out any values) which is causing the file not to be uploaded to the server in subsequent submissions.
Issues noted:
1) If there is any exception thrown, in the subsequent submissions the file Data is not being sent to the server.
Browsers: Chrome 33, safari 5.1.7
We are seeing this issue on chorme and safari browsers. IE works fine.
We have a dynamic form with multiple text fields and one field to upload csv files as follows.
{
name: "file",
required: true,
width: 250,
type: "binary",
colSpan: 3
}
We throw parsing Exception in the server, if the uploaded file is not a csv file and set status as 100 and return a message.
In the saveData call back we look for the status code and display the error message as shown below. Once we close the message window, we clear the values and the empty form is displayed.
this.form.saveData(
function(dsResponse, data, dsRequest) {
if(dsResponse.status==100||dsResponse.status==-4){
isc.say(data); windowRef.uploadDynamicForm.clearValues();
}else { //we display a grid.}
}
, {
params: {
}
});
Now if we try to upload the correct csv file and submit, all the values except the file data is available in the server.
As you see, the way we are handling the error in the form is by catching an exception on the server
catch (ParseException e) {
log.error("Issue with uploading file", e);
dsResponse.setData(ERROR_MSG);
dsResponse.setStatus(100);
}
By doing this are we missing anything (clearing out any values) which is causing the file not to be uploaded to the server in subsequent submissions.
Issues noted:
1) If there is any exception thrown, in the subsequent submissions the file Data is not being sent to the server.
Comment