开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜