Grails
  1. Grails
  2. GRAILS-7958

Web flow plugin doesn't work with grails 2.0.0M1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-M1
    • Fix Version/s: 2.0-M2
    • Component/s: Plugins, WebFlow
    • Labels:
      None
    • Environment:
      MacOSX 10.6.8, JVM 1.6

      Description

      Web flow plugin doesn't work as described in official documentation (http://grails.org/doc/2.0.0.M1/guide/theWebLayer.html#webflow): actions ending with *Flow are treated like other actions, so the defined flow can't start.

        Issue Links

          Activity

          Hide
          Graeme Rocher added a comment -

          we have functional tests that cover this behavior and webflow (these tests are passing) appears to operate fine as long as you have the webflow plugin installed

          Please attach an example that reproduces the problem

          Show
          Graeme Rocher added a comment - we have functional tests that cover this behavior and webflow (these tests are passing) appears to operate fine as long as you have the webflow plugin installed Please attach an example that reproduces the problem
          Hide
          Pierpaolo Follia added a comment -

          Please, see the duplicated issue http://jira.grails.org/browse/GRAILS-7959, there is an attached example that reproduce the problem

          Show
          Pierpaolo Follia added a comment - Please, see the duplicated issue http://jira.grails.org/browse/GRAILS-7959 , there is an attached example that reproduce the problem
          Hide
          Graeme Rocher added a comment -

          If I go to the attached sample at URL:

          http://localhost:8080/flowtest/foo/baseline

          I see "Hello, Flow" printed so webflow plugin is working. However there is a bug in that if you go to:

          http://localhost:8080/flowtest/foo/baselineFlow

          You get an exception like:

          groovy.lang.MissingMethodException: No signature of method: flowtest.FooController.showQuestion() is applicable for argument types: (flowtest.FooController$_closure2_closure3) values: [flowtest.FooController$_closure2_closure3@10e07658]
          
          	at flowtest.FooController$_closure2.doCall(FooController.groovy:8)
          
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          
          	at java.
          

          Which clearly shouldn't be happening

          Show
          Graeme Rocher added a comment - If I go to the attached sample at URL: http://localhost:8080/flowtest/foo/baseline I see "Hello, Flow" printed so webflow plugin is working. However there is a bug in that if you go to: http://localhost:8080/flowtest/foo/baselineFlow You get an exception like: groovy.lang.MissingMethodException: No signature of method: flowtest.FooController.showQuestion() is applicable for argument types: (flowtest.FooController$_closure2_closure3) values: [flowtest.FooController$_closure2_closure3@10e07658] at flowtest.FooController$_closure2.doCall(FooController.groovy:8) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java. Which clearly shouldn't be happening
          Hide
          Pierpaolo Follia added a comment - - edited

          Ok, I found the problem: the sample created by John D'Emic in the duplicated issue, uses a closure for the flow "action", and this is actually working. In my code I have a method and this is not working. To replicate the problem simply change the FooController action definition, from

          def baselineFlow = {
          

          to

          def baselineFlow() {
          

          an redirect it from the index:

          def index() { redirect action:"baseline" }
          

          The current documentation is using a method, and not a closure.

          Show
          Pierpaolo Follia added a comment - - edited Ok, I found the problem: the sample created by John D'Emic in the duplicated issue, uses a closure for the flow "action", and this is actually working. In my code I have a method and this is not working. To replicate the problem simply change the FooController action definition, from def baselineFlow = { to def baselineFlow() { an redirect it from the index: def index() { redirect action: "baseline" } The current documentation is using a method, and not a closure.
          Hide
          Graeme Rocher added a comment -

          flow definitions currently have to be closures

          Show
          Graeme Rocher added a comment - flow definitions currently have to be closures
          Hide
          Pierpaolo Follia added a comment -

          Ok, documentation should be fixed: the provided example is wrong.

          Show
          Pierpaolo Follia added a comment - Ok, documentation should be fixed: the provided example is wrong.

            People

            • Assignee:
              Graeme Rocher
              Reporter:
              Pierpaolo Follia
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development