You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ryan Wynn <rw...@us.ibm.com> on 2005/10/14 18:32:39 UTC

[Shale] IndexOutOfBoundsException

Using clay html views I am getting an IndexOutOfBoundsException at line 
106 of org.apache.shale.clay.component.chain.CreateComponentCommand.  This 
line does the following:

parent.getChildren().add(clayContext.getChildIndex(), child); 

where parent and child are UIComponents.

My exception reports that the index is 21 and the size of children is 20.

How does this child index get created?  Does this correspond to the 
renderId of nested elements?  In my case I am sure none of my clay 
components have 21 child elements defined in my xml.  So I am wondering 
where this 21 is coming from.

FYI, this problem started happening when I tried to use the clay 
managed-bean-name token.  I had a working dataTable that had hard coded 
value bindings and I replaced these bindings with the token 
managed-bean-name.

Then I declared the following before my datatable.

<span jsfid="clay"  allowBody="false" 
managedBeanName="baseRequestBean.peopleBean" jsfid="contactTable"></span>

<table jsfid="contactTable" ...

Any help would be appreciated.