jQuery Plugin

<g:submitToRemote/> should render 'data' rather than 'textStatus' even in failure

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: Grails-jQuery 1.4.2.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    grails 1.2.0
    jquery-1.4.1.1
  • Patch Submitted:
    Yes

Description

textStatus doesn't return a meaningful info. User can return any data from the server side just as in success case

      • JQueryProvider.groovy Wed Feb 3 21:45:37 2010
      • JQueryProvider.groovy.org Wed Feb 3 21:50:32 2010
        ***************
      • 150,156 ****

if (attrs.update instanceof Map) {
if (attrs.update?.failure) {
! out << "jQuery('#${attrs.update?.failure}').html(data);"
}
}

— 150,156 ----

if (attrs.update instanceof Map) {
if (attrs.update?.failure) {
! out << "jQuery('#${attrs.update?.failure}').html(textStatus);"
}
}

Activity

Hide
Tsuyoshi Miyake added a comment -

Sorry, I've copied a missing patch. The correct one is

      • JQueryProvider.groovy Thu Feb 4 14:55:25 2010
      • JQueryProvider.groovy.org Wed Feb 3 21:50:32 2010
        ***************
      • 150,156 ****

if (attrs.update instanceof Map) {
if (attrs.update?.failure) {
! out << "jQuery('#${attrs.update?.failure}').html(XMLHttpRequest.responseText);"
}
}

— 150,156 ----

if (attrs.update instanceof Map) {
if (attrs.update?.failure) {
! out << "jQuery('#${attrs.update?.failure}').html(textStatus);"
}
}

Show
Tsuyoshi Miyake added a comment - Sorry, I've copied a missing patch. The correct one is
      • JQueryProvider.groovy Thu Feb 4 14:55:25 2010
      • JQueryProvider.groovy.org Wed Feb 3 21:50:32 2010 ***************
      • 150,156 ****
if (attrs.update instanceof Map) { if (attrs.update?.failure) { ! out << "jQuery('#${attrs.update?.failure}').html(XMLHttpRequest.responseText);" } } — 150,156 ---- if (attrs.update instanceof Map) { if (attrs.update?.failure) { ! out << "jQuery('#${attrs.update?.failure}').html(textStatus);" } }
Hide
Finn Herpich added a comment -

Accepted

Show
Finn Herpich added a comment - Accepted

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: