incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sabina Albu" <sabina.a...@gmail.com>
Subject Re: Re: no dynamic columns for tr:table
Date Fri, 22 Dec 2006 20:43:01 GMT
Hi Ly,

My solution to this problem was to put the whole table in one row. So, I
removed all the table indentation from my code and it worked.

Sabina


On 12/22/06, Ly Le <lle@guardiananalytics.com> wrote:
>
> When I use <c:forEach> in <tr:table>, I always get the following error:
>
>
>
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>
>            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
>
>            at java.util.ArrayList.get(ArrayList.java:321)
>
>            at
> javax.faces.component._ComponentChildrenList.get
> (_ComponentChildrenList.java
> :45)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState
> (UIXCol
> lection.java:816)
>
>            at
> org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(
> UIXTable.ja
> va:323)
>
>            at
> org.apache.myfaces.trinidad.component.StampState.restoreChildStampState
> (Stam
> pState.java:152)
>
>            at
> org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(
> UIXTable.ja
> va:320)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState
> (UIXCo
> llection.java:1115)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange
> (UIXCol
> lection.java:708)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex
> (UIXCollectio
> n.java:406)
>
>            at
> org.apache.myfaces.trinidad.component.UIXTable._processStamps(
> UIXTable.java:
> 395)
>
>            at
> org.apache.myfaces.trinidad.component.UIXTable.processFacetsAndChildren
> (UIXT
> able.java:268)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection.decodeChildrenImpl
> (UIXCo
> llection.java:159)
>
>            at
> org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren
> (UIXCom
> ponentBase.java:874)
>
>            at
> org.apache.myfaces.trinidad.component.UIXCollection.processDecodes
> (UIXCollec
> tion.java:153)
>
>            at javax.faces.component.UIForm.processDecodes(UIForm.java:56)
>
>
>
> Here is my <tr:table> code:
>
>
>
> <tr:table id="sessionTable" value="#{alertsList}" var="sess"
> styleClass="listView" width="100%" varStatus="vs">
>
>                                    <tr:column width="20px" headerText="">
>
>                                                <s:span
> styleClass="icon-viewed">V</s:span>
>
>                                    </tr:column>
>
>                                    <tr:column width="72px"
> headerText="Risk">
>
>                                                <s:div
> styleClass="#{sess.styleClass}">
>
>
> <p><h:outputText
> value="#{sess.risk}">
>
>
> <f:convertNumber maxFractionDigits="3"/>
>
>
> </h:outputText>
>
>                                                            </p>
>
>                                                </s:div>
>
>                                    </tr:column>
>
>                                    <tr:column width="80px"
> headerText="Account">#{sess.account}</tr:column>
>
>                                    <tr:column width="80px"
> headerText="Session">#{sess.kvalue}</tr:column>
>
>                                    <c:choose>
>
>                                    <c:when test="#{empty alertsList}">
>
>                                                <c:forEach var="prop"
> items="#{alertssearch.sessionDisplayProperties}">
>
>                                                            <tr:column
> width="80px" headerText="#{prop.propDef.displayName}">
>
>
>                                                            </tr:column>
>
>                                                </c:forEach>
>
>                                    </c:when>
>
>                                    <c:otherwise>
>
>                                                <c:forEach var="prop"
> items="#{vs.current.displayProperties}">
>
>                                                            <tr:column
> width="80px" headerText="#{prop.propDef.displayName}">
>
>
> <h:outputText value="#{prop.firstParam.value}"
> styleClass="#{prop.styleClassForAlert}"/>
>
>                                                            </tr:column>
>
>                                                </c:forEach>
>
>                                    </c:otherwise>
>
>                                    </c:choose>
>
>
> </tr:table>
>
>
>
> Can you please let me know what's wrong?
>
>
>
> Thanks
>
> ly
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message