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
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