{请教}{模仿navi-menu}

6 views
Skip to first unread message

zongzi

unread,
Dec 25, 2009, 11:02:11 AM12/25/09
to grail...@googlegroups.com
我在模仿navi-menu的时候遇到一个问题
 
创建了
grails create-domain-class com.buyaoa.apps.kis.SimpleMenu
grails create-tag-lib com.buyaoa.apps.kis.TagLib.SimpleMenu

然后在页面中,想要使用类似下面的语句
<div class="simpleMenu">
  <g:simpleMenu root="${com.buyaoa.apps.kis.SimpleMenu.findByParentIsNull()}" />  
</div>
 
 
访问页面的时候报错:
 
Error : null
Servlet:
URI:
Exception Message: Tag [simpleMenu] does not exist. No tag library found for namespace: g
Caused by: Tag [simpleMenu] does not exist. No tag library found for namespace: g
Class: E:/dev/grails-templar/examples/kis-config/grails-app/views/main.gsp
At Line: [44]
Code Snippet:
43:
44: </td>
45: </tr>

--
行为源自需求,理念成就未来!

derekypp peng

unread,
Dec 25, 2009, 5:31:03 PM12/25/09
to grail...@googlegroups.com
訊息上來看,『Tag [simpleMenu] does not exist. No tag library found for namespace: g 』
就是說它找不到simpleMenu 這個tag

所以你雖然建了grails create-tag-lib com.buyaoa.apps.kis.TagLib.SimpleMenu

某些原因,grails 找不到這個tag
也有可能是這個tag
SimpleMenu.groovy 裡面的

def simpleMenu = {


這個沒有寫對 因為tag名字是看檔案裡面的methd


2009/12/26 zongzi <hongh...@gmail.com>

--

您收到此邮件是因为您订阅了 Google 网上论坛的“Grails联盟-GrailsUnion”论坛。
要向此网上论坛发帖,请发送电子邮件至 grail...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 grailsunion...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/grailsunion?hl=zh-CN 访问此网上论坛。

Tigerf

unread,
Jan 10, 2010, 9:07:17 PM1/10/10
to grailsunion
zongzi,你好

你就是正在实现kisConfig的honghunter吧?我在尝试运行kisConfig工程,但是碰到一个编译错误:

  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: star
tup failed, D:\works\grails-templar\examples\kis-config\grails-app\services\Emai
lerService.groovy: 1: unable to resolve class javax.mail.MessagingException
  [groovyc]  @ line 1, column 1.
  [groovyc]    import javax.mail.MessagingException
  [groovyc]    ^
  [groovyc] D:\works\grails-templar\examples\kis-config\grails-app\services\Emai
lerService.groovy: 47: unable to resolve class javax.mail.MessagingException
  [groovyc]  @ line 47, column 39.
  [groovyc]                     log.error "Failed to send emails: $e.message", e

  [groovyc]                                          ^
  [groovyc] D:\works\grails-templar\examples\kis-config\grails-app\services\Emai
lerService.groovy: 47: unable to resolve class javax.mail.MessagingException
  [groovyc]  @ line 47, column 51.
  [groovyc]     to send emails: $e.message", e
  [groovyc]                                  ^
  [groovyc]
  [groovyc] 3 errors
Compilation error: Compilation Failed

请你看一下是什么内容没有配置正确吗?

Thanks & Best Regards
Tigerf


2009/12/26 derekypp peng <dere...@gmail.com>

zongzi

unread,
Jan 10, 2010, 9:40:15 PM1/10/10
to grail...@googlegroups.com

你好,真奇怪,我没有用到邮件功能啊。我再查查看。

Reply all
Reply to author
Forward
0 new messages