myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joris Kimpe <joris.ki...@get.be>
Subject [TRINIDAD] IndexOutOfBoundsException using iterator
Date Fri, 20 Jun 2008 08:43:48 GMT

Hi all,

I need to dynamically add some columns to 1 column of my table.  So I added
a tr:iterator to my column which need to add a column for each entry in
row.counters (which is a List of my backing bean).  But this results in an
error...

The error I get is:
        java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
        at java.util.ArrayList.RangeCheck(Unknown Source)
        at java.util.ArrayList.get(Unknown Source)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.ColumnData._get(ColumnData.java:431)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.ColumnData.useSeparateRows(ColumnData.java:284)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:213)
        at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.encodeAll(ColumnRenderer.java:96)
        at
org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:224)
        ...


This is what I did:
<tr:table id="overview" value="#{backingBean.dataModel}" var="row">
        <tr:column>
                <f:facet name="header">
                        <tr:outputText value="Date"/>
                </f:facet>
                <tr:outputText value="#{row.date}"/>
        </tr:column>
        <tr:column width="20%" headerText="Counters">
                <tr:column>
                        <tr:iterator value="#{row.counters}" var="counter">
                                <tr:column headerText="id">
                                        <tr:outputLabel
value="#{counter.valueString}"/>
                                </tr:column>
                        </tr:iterator>
                </tr:column>
        </tr:column>
-- 
View this message in context: http://www.nabble.com/-TRINIDAD--IndexOutOfBoundsException-using-iterator-tp18025069p18025069.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message