开发者

how can i call mapped uri form link?

"/list"(
    controller:"register",
    action:"list") 

i have written that in urlmapping file then,in my index.gsp i have,

  <g:link uri="/list">Click for new registration</g:link>

now when i click on link it should display me only list in url but i a开发者_运维知识库m still getting controller name, why is it so ?


actually never saw the uri parameter in g:link.

see reference:

http://grails.org/doc/1.0.x/ref/Tags/link.html

g:link url though needs two parameters. controller and action.

as you have a non-standard url-mapping (/controller/action) g:link is not the best solution here. static links though should work:

<a href="/yourAction">link</a>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜