Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Invalid
-
Affects Version/s: 1.7.1
-
Fix Version/s: 1.7.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:any
-
Support Case References:
Description
SystemError java.lang.IllegalArgumentException: Could not find the MenuPopup
In some cases it might be useful to place the component somewhere else on the page or even to separate it on a template page. The component should still be referenced via its id attribute.
-
Hide
- Test_MenuPopup.war
- 6.42 MB
- Michael Thiem
-
- META-INF/MANIFEST.MF 0.0 kB
- WEB-INF/classes/test/MenuPopup.class 0.6 kB
- WEB-INF/classes/.../NodeUserObject.class 3 kB
- WEB-INF/classes/test/TreeBean.class 5 kB
- WEB-INF/faces-config.xml 0.8 kB
- WEB-INF/html_basic.tld 244 kB
- WEB-INF/jsf_core.tld 25 kB
- WEB-INF/lib/backport-util-concurrent.jar 319 kB
- WEB-INF/lib/commons-beanutils.jar 116 kB
- WEB-INF/lib/commons-collections.jar 167 kB
- WEB-INF/lib/commons-digester.jar 140 kB
- WEB-INF/lib/commons-fileupload.jar 87 kB
- WEB-INF/lib/commons-logging.jar 31 kB
- WEB-INF/lib/el-api.jar 24 kB
- WEB-INF/lib/el-ri.jar 97 kB
- WEB-INF/lib/icefaces-comps.jar 1.70 MB
- WEB-INF/lib/icefaces-facelets.jar 593 kB
- WEB-INF/lib/icefaces.jar 958 kB
- WEB-INF/lib/jsf-api.jar 356 kB
- WEB-INF/lib/jsf-impl.jar 679 kB
- WEB-INF/lib/jstl.jar 20 kB
- WEB-INF/.../krysalis-jCharts-1.0.0-alpha-1.jar 151 kB
- WEB-INF/lib/standard.jar 384 kB
- WEB-INF/lib/xercesImpl.jar 1.15 MB
- WEB-INF/lib/xml-apis.jar 190 kB
- WEB-INF/web.xml 3 kB
- css/showcase_style.css 15 kB
- index.jsp 0.2 kB
- main.jspx 5 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
test case demonstrating the issue
All you have to do is add the appropriate number of colons before the menuPopup's id. In this case, I believe it would be 4.
...
<ice:panelGroup style="display: inline" menuPopup="::::popupLayer">
...
<ice:menuPopup id="popupLayer">
...
For example, I made a change to the component showcase to mimic the attached WAR. Using Firebug, I found the panelGroup's rendered DIV's id, and the menuPopup's rendered DIV's id, which are, respectively:
iceform:tree:n-2-0:j_id197
iceform:mrkmnu
So, we start with two colons, because that's the special escape sequence to tell findComponent to search upwards. If the menuPopup had been a peer of the panelGroup, then its DIV's id would have been "iceform:tree:n-2-0:mrkmnu". But since I located it just inside the form, it's two levels up. So that's two more colons, for a total of four.
placing the menuPopup somewhere else on the page causes the following exception (see attached test case):
java.lang.IllegalArgumentException: Could not find the MenuPopup UIComponent referenced by attribute menuPopup="popupLayer" in UIComponent of type: com.icesoft.faces.component.ext.HtmlPanelGroup with id: "_id17"
at com.icesoft.faces.component.menupopup.MenuPopupHelper.findMenuPopup(MenuPopupHelper.java:77)
at com.icesoft.faces.component.menupopup.MenuPopupHelper.renderMenuPopupHandler(MenuPopupHelper.java:20)
at com.icesoft.faces.component.ext.renderkit.GroupRenderer.encodeBegin(GroupRenderer.java:148)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:675)
at com.icesoft.faces.component.util.CustomComponentUtils.renderChild(CustomComponentUtils.java:337)
at com.icesoft.faces.component.tree.TreeNodeRenderer.encodeEnd(TreeNodeRenderer.java:76)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:712)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:362)
at com.icesoft.faces.component.tree.TreeRenderer.encodeNode(TreeRenderer.java:574)
at com.icesoft.faces.component.tree.TreeRenderer.encodeParentAndChildNodes(TreeRenderer.java:276)
at com.icesoft.faces.component.tree.TreeRenderer.encodeChildren(TreeRenderer.java:229)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:352)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:550)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:554)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:18)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64)
at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40)
at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:619)