开发者

Grails: How to specify the default/root controller in taglib arguments?

开发者 https://www.devze.com 2023-03-19 14:10 出处:网络
Is it possible to specify the root controller when using the built in grails taglibs? For example开发者_如何学运维, is there some way of doing something similar to:

Is it possible to specify the root controller when using the built in grails taglibs?

For example开发者_如何学运维, is there some way of doing something similar to:

<g:submitToRemote controller="/" action="someAction" />

which results in call to /someAction?

controller="/", "null" and "" are all invalid. Not specifying the controller parameter means that the current controller is used.


It maps to controller + action, not to urls. Urls are configured at conf/UrlMapping.groovy.

And if your controller RootController with action someAction is mapped there to url /someAction then <g:submitToRemote controller="root" action="someAction"/> will use url /someAction as target.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号