myGSP

1. two method to call another tab from one tab(^+^grails)

1.1 url= '<r2k:categoryUrl category="${cat}" retailerName="${retailer?.name?:''}"/>'
1.2 url="${r2k.categoryUrl(category:cat, retailerName:retailer?.name?:'')}"

 

2. use the global variable

<g:set var="lastChildIndex" value="${navItem.children?i+navItem.children?.size():lastChildIndex}"/>  

 

3. cannot taglib embed taglib 

<g:link url="
<g: yourTagLib>xx</g:yourTagLib>
">xx<g:link>

  

i guest that is because the GSP don't know the taglib render order, use this can be one solution

<a href="
<g: yourTagLib>xx</g:yourTagLib>
"/>xx</a>

 another solution tips, method-style syntax like below 1.

你可能感兴趣的:(grails,GSP)