Forums Register Login

Tomahawk t:panelNavigation2 execption...

+Pie Number of slices to send: Send
Hi Experts,

Im new the world of JSF and is presently trying the Apache MyFaces Tomahawk implementaion.

I'm trying to use the <t:panelNavigation2 > </t:panelNavigation2>



But it is giving me the this exception:



java.lang.IllegalStateException: Parent was not null, but this component not related
at javax.faces.component.UIComponentBase.eraseParent(UIComponentBase.java:437)
at javax.faces.component.UIComponentBase.access$500(UIComponentBase.java:56)
at javax.faces.component.UIComponentBase$ChildrenList.add(UIComponentBase.java:1460)
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.addUINavigationMenuItems(HtmlNavigationMenuRenderer.java:194)
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.preprocessNavigationItems(HtmlNavigationMenuRenderer.java:178)
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.encodeEnd(HtmlNavigationMenuRenderer.java:99)
-----------------------------------------------------------------------------------------------------

This is my jsp code:

<t:panelNavigation2 id="nav1" layout="list" activeItemClass="selected" openItemClass="selected" >

<t:navigationMenuItems value="#{navigationMenu.panelNavigationItems}" />

</t:panelNavigation2>



The bean code is :

List menu = new ArrayList();
NavigationMenuItem products = new NavigationMenuItem("#{example_messages['panelnav_products']}", "#{navigationMenu.getAction}");
menu.add(products);
products.add(new NavigationMenuItem("#{example_messages['panelnav_serach']}", "#{navigationMenu.getAction}"));
products.add(new NavigationMenuItem("#{example_messages['panelnav_serach_acc']}", "#{navigationMenu.getAction}"));
products.add(new NavigationMenuItem("#{example_messages['panelnav_search_adv']}", "#{navigationMenu.getAction}"));
menu.add(new NavigationMenuItem("#{example_messages['panelnav_shop']}", "#{navigationMenu.getAction}"));
NavigationMenuItem corporateInfo = new NavigationMenuItem("#{example_messages['panelnav_corporate']}", "#{navigationMenu.getAction}");
menu.add(corporateInfo);
corporateInfo.add(new NavigationMenuItem("#{example_messages['panelnav_news']}", "#{navigationMenu.getAction}"));
corporateInfo.add(new NavigationMenuItem("#{example_messages['panelnav_investor']}", "#{navigationMenu.getAction}"));
menu.add(new NavigationMenuItem("#{example_messages['panelnav_contact']}", "#{navigationMenu.getAction}"));




This is same as the example.



I have seen many entries on net after googling for it.

http://forum.java.sun.com/thread.jspa?threadID=706057&messageID=4091419



This link talks about a patch

https://issues.apache.org/jira/browse/TOMAHAWK-161



Can any one tell me wht is the problem and wht is the solution for it



It will be great if any one can help me here.



Thanks and Regards.

Ved
Everybody! Do the Funky Monkey! Like this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1442 times.
Similar Threads
Hide Source Code in Struts
Getting error while compiling
Using Combo Box in JSP
How to pass a scriptlet value into JS function?
Displaying Binary Data Fetched with AJAX
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:14:33.