Skip to content

Conversation

@boillodmanuel
Copy link

Hi,

I have update JQueryProvider in order to handle on_ERROR_CODE described in Grails Documentation.
I also add XMLHttpRequest to the onSuccess callback function.

Could you add it to jquery plugin ?

Thanks

Commit message:

Attribute onSuccess: add XMLHttpRequest as third parameters of jquery success function

Attributes on_ERROR_CODE: handled with jquery statusCode (see http://api.jquery.com/jQuery.ajax/)
if ERROR_CODE is 2xx or 304, callback has the same parameters than success function, otherwise callback has the same parameters than error function

Usage Samples

<g:formRemote name="remoteForm" 
    url="[action:'myAction']" 
    on200="jQuery('#div200').html(data)"
    on201="jQuery('#div201').html(data)"
    on404="jQuery('#div404').html(errorThrown)"
>

… success function

Attributes on_ERROR_CODE: handled with jquery statusCode (see http://api.jquery.com/jQuery.ajax/)
if ERROR_CODE is 2xx or 304, callback has the same parameters than success function, otherwise callback has the same parameters than error function
@jameskleeh
Copy link

Why hasn't this been merged?

@boillodmanuel
Copy link
Author

Have someone looked at my pull request ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants