javierdotnet / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 3 forks source link

onActionFailed form listener errors out #437

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
based on forum:
http://gwt-ext.com/forum/viewtopic.php?f=8&t=3085

In Form.java we have :

Code:
form.addListener('actionfailed',
                function(frm, action) {
                    var responseText = '';
                    var status = 200;
                    if(action.response && action.response != null) {
                        responseText = action.response.responseText;
                        status = action.response.status;
                    }

If connection error action.response.responseText do not exist 
we have action.response.statusText

I propose the following correction : 

Code:
form.addListener('actionfailed',
                function(frm, action) {
                    var responseText = '';
                    var status = 200;
                    if(action.response && action.response != null) {
                        responseText = action.response.responseText ?

action.response.responseText:action.response.statusText ;
                        status = action.response.status;
                    }

Original issue reported on code.google.com by mlim1...@gmail.com on 10 Oct 2008 at 7:35

GoogleCodeExporter commented 9 years ago
Fixed as described above!

Original comment by mlim1...@gmail.com on 10 Oct 2008 at 7:37