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

The index is generated when a component is assigning children.  The index is 
just incremented for each child.  It's not related to the renderId property.  

The renderId property for HTML views is generated and you don't have control.  
The significance of the renderId in in defining a complex component in the XML. 
 The renderId defines the sequence and the signature for inheritance.

<component jsfid="mypanel" extends="gridPanel">
     <attributes>
           <set name="columns" value="2"/>
     </attributes>
     <element renderId="0" jsfid="space"/>
     <element renderId="1" jsfid="city"/>
</component>

<component jsfid="anotherpanel" extends="mypanel">
     <element renderId="0" jsfid="cityLabel"/>
</component>


The index int is used because when a view is restored, components that were 
marked as transient are created where other components are just restored.  
Transient components makes a difference when using client side state saving.

In html views, tokens that are not directly bound to a jsfid or implied mapping 
(form, a, input, select...) are inserted into the component tree as "verbatim" 
components.  This translates into a outputText with the isTransient attribute 
set to "true".


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

I think the problem is that you have two jsfid attributes (second overrides the 
first).  Try using the "clayJsfid".  This is a new feature added a few weeks 
ago.  Otherwise, I don't see the problem but I only got half your mail due to 
my webmail interface not escaping.  

If that doesn't fix the problem, please create a buzilla ticket and attach your 
html view.  

Gary




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to