开发者

What is the correct way to write this in GSP?

I'm Using Grails 1.2.1, Groovy 1.7.7. For this line of code in a GSP ...

<g:if test="${not empty sessionScope.adminUser}"> 

I'm getting this error,

2011-03-21 09:15:38,960 [http-8080-5] ERROR StackTrace  - Sanitizing stacktrace:  
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Users_davea_Documents_workspace_sts_2_6_0_SR1_socialmediaproxy_grails_app_views_index_gsp: 34: expecting ')', found 'empty' @ line 34, column 17.  
1 error

What is the correct syntax I should be u开发者_StackOverflow社区sing in my GSP file? THanks, - Dave


This should work < g:if test="${sessionScope.adminUser}">


Try !empty or simply ${sessionScope.adminUser}

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜