No such property: request for class: org.grails.jquery.validation.ui.JqueryValidationService
jbowen7 opened this issue · comments
Grails 2.1.1
jquery-validation-1.4
Line 348 of ValidationService.groovy
It seems that request is not available in services, you need first to :
import org.codehaus.groovy.grails.web.util.WebUtils
def webUtils = WebUtils.retrieveGrailsWebRequest()
//Getting the Request object
def request = webUtils.getCurrentRequest()
//Getting the Response object
def response = webUtils.getCurrentResponse()
//Getting the ServletContext object
def context = webUtils.getServletContext()
This is due to refactoring of the tag lib class into a service. 'request' is available in taglibs, but not in services. I'm submitting a pull request for this.
Hi there!
Just to let you know that this issue isn't really resolved :( I've just tried the new version (1.4.1) and now fails with the following exception:
Message: No such property: RequestContextHolder for class: org.grails.jquery.validation.ui.JqueryValidationService
I reckon the import is missing, so if you add the following import in the JqueryValidationService.groovy everything will work :)
import org.springframework.web.context.request.RequestContextHolder
Is there any chances to have that sorted in version 1.4.1?
Thanks in advance!
Good catch! Thanks for report this issue with solution provided.
v1.4.2 released! Please let's me know if you find any issue. :)
Wow! That's what I call speed! Thank you so much for releasing 1.4.2 so fast :)
You're mostly welcome! :)