简体   繁体   English

了解Grails上的WebFlow

[英]Understanding WebFlow on Grails

I'm using Spring Web Flow on Grails (2.0.8.1 on grails 2.3.11). 我在Grails上使用Spring Web Flow(在grails 2.3.11上为2.0.8.1)。 I've created all dir under views and this is my little flow: 我在视图下创建了所有目录,这是我的一点流程:

    def registrazioneUtenteFlow = {

        log.info("Registrazione Flow")

        step1_informazioni_personali {
            on("next").to("step2_informazioni_personali")
        }

        step2_informazioni_personali {
            on("submit").to "step3_informazioni_personali"
            on("return").to "step1_informazioni_personali"
        }

        step3_informazioni_personali {

        }
    }

I created three gsp under controllerName/flowName. 我在controllerName / flowName下创建了三个gsp。 Inside each JSP there is a form with a submit button. 每个JSP内都有一个带有提交按钮的表单。 Ex. 例如 for first GSP: 对于第一个GSP:

<g:form action="registrazioneUtente">
     <g:submitButton name="next" value="NEXT" />
</g:form>

Now.. If i put inside the state the "on" rule, I have an 404 with this url 现在..如果我在状态中放入“ on”规则,则我有一个带有此URL的404

registrazioneUtente?execution=e8s1&format=

But if I leave this from step1_informazioni_personali, I can see the page. 但是,如果我将其保留在step1_informazioni_personali中,则可以看到该页面。

Why?!? 为什么?!?

Thanks in advance 提前致谢

I found the problem: 我发现了问题:

The error happens because my controller have a namespace : "SITE". 发生错误是因为我的控制器具有一个名称空间:“ SITE”。 Removing it, all it work. 删除它,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM