This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes JSF and the fly likes Tomahawk  t:panelNavigation2 execption... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Tomahawk  t:panelNavigation2 execption..." Watch "Tomahawk  t:panelNavigation2 execption..." New topic

Tomahawk t:panelNavigation2 execption...

ved gunjan
Ranch Hand

Joined: May 17, 2003
Posts: 86
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(
at javax.faces.component.UIComponentBase.access$500(
at javax.faces.component.UIComponentBase$ChildrenList.add(
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.addUINavigationMenuItems(
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.preprocessNavigationItems(
at org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlNavigationMenuRenderer.encodeEnd(

This is my jsp code:

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

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


The bean code is :

List menu = new ArrayList();
NavigationMenuItem products = new NavigationMenuItem("#{example_messages['panelnav_products']}", "#{navigationMenu.getAction}");
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}");
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.

This link talks about a patch

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.

I agree. Here's the link:
subject: Tomahawk t:panelNavigation2 execption...
It's not a secret anymore!