Parent not null but this component not related

I am using Suns RI with Apache Tomahawk. I am trying to implement a menu structure using the tag

<t:panelNavigation2 id="nav1" >

as,

<t:panelNavigation2 id="nav1" >

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

</t:panelNavigation2>

Upon doing so, I get the following error:

java.lang.IllegalStateException: Parent was not null, butthis 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)

at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:720)

at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:623)

at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:546)

at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)

at org.apache.jsp.menu_jsp._jspx_meth_t_panelNavigation2_0(menu_jsp.java:184)

at org.apache.jsp.menu_jsp._jspx_meth_h_form_0(menu_jsp.java:143)

at org.apache.jsp.menu_jsp._jspx_meth_f_view_0(menu_jsp.java:113)

at org.apache.jsp.menu_jsp._jspService(menu_jsp.java:77)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)

Any help on this would be greately appreciated. Thanks much.

[1984 byte] By [svacharya] at [2007-10-2 11:40:57]
# 1

Hello,

I would like to know if you found a solution because I'm having the same problem.

Here is my source code :

public List getPanelNavigationItems()

{

List menu = new ArrayList();

List stList = this.newQuestionnaire.getGenericStepList();

Iterator stIt = stList.iterator();

while (stIt.hasNext()){

Step step = (Step) stIt.next();

NavigationMenuItem stepItem = new NavigationMenuItem(step, step.getTitle(), step.getDescription(), true, "paramStep", null, true);

List qList = step.getGenericQuestionList();

Iterator qIt = qList.iterator();

while (qIt.hasNext()){

Question quest = (Question) qIt.next();

NavigationMenuItem questItem = new NavigationMenuItem(quest, quest.getText(), quest.getText(), true, "paramQuestion", null, true);

stepItem.add(questItem);

}

menu.add(stepItem);

}

return menu;

}

<t:panelNavigation2 id="nav1" layout="list" >

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

</t:panelNavigation2>

Thanks for your answer

nanounaa at 2007-7-13 5:33:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
check out https://issues.apache.org/jira/browse/TOMAHAWK-161
adrianpja at 2007-7-13 5:33:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
hi,what do i have to do with panelNav2fix.patch?thx
Dill0ra at 2007-7-13 5:33:07 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...