0

How to SetVisible MenuItem

asked 2009-05-01 12:35:15 +0800

ibsolution gravatar image ibsolution
468 1 1 6

hai,

i got a problem that getFellow(compId) method can find a component menuItem.

i need to setVisible false to MenuItem

((Menuitem)getFellow("menuactivities")).setVisible(false)

but i get an error

java.lang.NullPointerException
at ibs.menu.Menu.setMenuSales(Menu.java:133)
at ibs.menu.Menu.doFinally(Menu.java:128)
at org.zkoss.zk.ui.impl.RealInits.doFinally(Initiators.java:120)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:386)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:296)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

Regards,

Andy Susanto

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-05-01 13:18:17 +0800

YamilBracho gravatar image YamilBracho
1722 2

I think you have to specify the id space in the getFellow (say the parent of the menu item)

link publish delete flag offensive edit

answered 2009-05-01 13:36:10 +0800

ibsolution gravatar image ibsolution
468 1 1 6

updated 2009-05-01 16:27:49 +0800

hai,

i solved my problem just put onCreate method in Menubar Component

Regards,

Andy Susanto

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-05-01 12:35:15 +0800

Seen: 274 times

Last updated: May 01 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More