Grails
  1. Grails
  2. GRAILS-7613

Missing JQuery Prototype javascript library and documentation breaks submitToRemote

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.4-M1
    • Fix Version/s: 2.0-M1
    • Component/s: None
    • Labels:
      None

      Description

      With reference to GRAILS-7349 "Switch to jQuery as the default Javascript library"

      Where has prototype gone?

      I looked here:

      http://www.grails.org/plugin/search

      Where is the documentation detailing the changes someone needs to make when upgrading to Grails 1.4?

      I looked here:

      http://grails.org/doc/1.4.x/ref/Tags/submitToRemote.html#submitToRemote

      http://grails.org/doc/1.4.x/guide/3.%20Configuration.html

      and here:

      http://www.google.co.uk/search?q=configure+grails+javascript+library

      I also found some mention of a configuration setting called 'grails.views.javascript.library'

      But could not find any documentation for it, or what valid values are.

      The documentation for the tag 'javascript' does not mention jQuery and still mentions prototype.

      http://grails.org/doc/1.4.x/ref/Tags/javascript.html

      The end result of all this confusion is that any views or templates that use <g:submitToRemote> either in a brand new grails app or an upgraded grails app that was using prototype now longer works and results in the following stacktrace:

      2011-06-13 13:55:54,396 ["http-bio-localhost/127.0.0.1-8080"-exec-1] ERROR [/g14test].[gsp]  - Servlet.service() for servlet [gsp] in context with path [/g14test] threw exception org.codehaus.groovy.grails.web.mapping.exceptions.UrlMappingException: Error mapping onto view [/index]: Error processing GroovyPageView: No javascript provider is configured at C:/Data/clifdom/Development/Source/Tests/g14test/grails-app/views/index.gsp:116
              at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.renderViewForUrlMappingInfo(UrlMappingsFilter.java:307)
              at org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter.doFilterInternal(UrlMappingsFilter.java:193)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.obtainContent(GrailsPageFilter.java:254)
              at org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter.doFilter(GrailsPageFilter.java:143)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:69)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:69)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
              at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:244)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662)
      Caused by: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: No javascript provider is configured at
      C:/Data/clifdom/Development/Source/Tests/g14test/grails-app/views/index.gsp:116
              ... 3 more
      Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: No javascript provider is configured at C:/Data/clifdom/Development/Source/Tests/g14test/grails-app/views/index.gsp:116
              at C__Data_clifdom_Development_Source_Tests_g14test_grails_app_views_index_gsp$_run_closure2.doCall(C__Data_clifdom_Deveopment_Source_Tests_g14test_grails_app_views_index_gsp:68)
              at C__Data_clifdom_Development_Source_Tests_g14test_grails_app_views_index_gsp$_run_closure2.doCall(C__Data_clifdom_Development_Source_Tests_g14te
      st_grails_app_views_index_gsp)
              at java_util_concurrent_Callable$call.call(Unknown Source)
              at java_util_concurrent_Callable$call.call(Unknown Source)
              at C__Data_clifdom_Development_Source_Tests_g14test_grails_app_views_index_gsp.run(C__Data_clifdom_Development_Source_Tests_g14test_grails_app_vie
      ws_index_gsp:71)
              ... 3 more
      

      I would suggest adding a section to the grails guide regarding inital javascript configuration. I couldn't find one but maybe my google-fu is not with me today.

        Activity

        Hide
        Peter Ledbrook added a comment -

        You're right, sorry. I assumed it was there. Bit of an oversight :o The "upgrading" section needs filling in and then linking from the release notes or announcements.

        Show
        Peter Ledbrook added a comment - You're right, sorry. I assumed it was there. Bit of an oversight :o The "upgrading" section needs filling in and then linking from the release notes or announcements.
        Hide
        Ganesh Krishnan added a comment - - edited

        Hit this bug when I upgraded my application to 1.4-M1

        Setting grails.views.javascript.library="jquery" doesn't seem to work for submitToRemote functionality.

        Show
        Ganesh Krishnan added a comment - - edited Hit this bug when I upgraded my application to 1.4-M1 Setting grails.views.javascript.library="jquery" doesn't seem to work for submitToRemote functionality.
        Hide
        Graeme Rocher added a comment -

        The error is fixed, need to still work on the documentation so leaving this open for now

        Show
        Graeme Rocher added a comment - The error is fixed, need to still work on the documentation so leaving this open for now
        Hide
        Stefan Siprell added a comment -

        What would the current workaround be? I tried downgrading to 1.3.7 but this was next to impossible for me. What are the steps to get prototype / jsQuery working for 1.4.0M1? Cheers Stefan

        Show
        Stefan Siprell added a comment - What would the current workaround be? I tried downgrading to 1.3.7 but this was next to impossible for me. What are the steps to get prototype / jsQuery working for 1.4.0M1? Cheers Stefan
        Hide
        Graeme Rocher added a comment -

        The prototype plugin is now here with usage information http://grails.org/plugin/prototype

        Show
        Graeme Rocher added a comment - The prototype plugin is now here with usage information http://grails.org/plugin/prototype

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Dominic Clifton
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development