You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Darren McEntee <da...@amt-sybex.com> on 2007/10/18 10:24:25 UTC

[Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Hi, 

We're using Trinidad v1.0.1. We seem to be getting an issue with an IndexOutOfBoundsException on tr:selectOneChoice dropdowns.
We have two dropdowns, of which the second dropdown is populated (from DB) from the choice on the first dropdown.

What seems to be happening is that every so often, we get this IndexOutOfBoundsException error on a selection.
For example we select the first option from dropdown 1, which populates 10 values in dropdown 2. If we go back and select a different option in dropdown 1, which populates 4 values in dropdown 2 it causes this error. Its difficult to reproduce the error as it occurs sporadically, and not everytime.

The error is attached below. Does anyone else ever get this in their log output?
Is it a known bug in Trinidad? We're using Trinidad 1.0.1, with Sun App Server 8.2

Any info would be appreciated.
Thanks,
Darren.

Error:

[#|2007-10-17T18:52:35.031+0100|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.web|_ThreadID=27;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 11 is out of bounds. It should be between 0 and 3
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:399)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer._getSelectedIndex(SimpleSelectOneRenderer.java:466)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:261)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:109)
            at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:318)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:142)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:194)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:120)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241)
 
P Please consider the environment before printing this email
_________________________________________________________ 
 
1. The information contained in this E-mail, including any files transmitted with it, is confidential and may be legally privileged. This E-mail is intended only for the personal attention of the stated addressee(s). Any access to this E-mail, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail or any files transmitted with it. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this E-mail without the permission of the sender.
 
2. The views expressed in this E-mail are those of the author, and do not necessarily represent the views of AMT-SYBEX. Internet communications are not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.
 
AMT-SYBEX Limited is a UK company, registration number GB03036807 at address The Spirella Building, Bridge Road, Letchworth, SG6 4ET. 
AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
_________________________________________________________

RE: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Posted by "Perkins, Nate-P63196" <Na...@gdc4s.com>.
We have had a similar, sporadic problem.  We found it could be avoided by placing our SelectItem lists in page flow scope.  Hope that helps. 


Nate Perkins
General Dynamics C4 Systems

>This email message is for the sole use of the intended recipient(s) and may contain GDC4S
> confidential or privileged information. Any unauthorized review, use, disclosure or distribution
> is prohibited. If you are not an intended recipient, please contact the sender by reply email and
> destroy all copies of the original message.
>

-----Original Message-----
From: Darren McEntee [mailto:darren.McEntee@amt-sybex.com] 
Sent: Thursday, October 18, 2007 1:24 AM
To: MyFaces Discussion
Subject: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Hi, 

We're using Trinidad v1.0.1. We seem to be getting an issue with an IndexOutOfBoundsException on tr:selectOneChoice dropdowns.
We have two dropdowns, of which the second dropdown is populated (from DB) from the choice on the first dropdown.

What seems to be happening is that every so often, we get this IndexOutOfBoundsException error on a selection.
For example we select the first option from dropdown 1, which populates 10 values in dropdown 2. If we go back and select a different option in dropdown 1, which populates 4 values in dropdown 2 it causes this error. Its difficult to reproduce the error as it occurs sporadically, and not everytime.

The error is attached below. Does anyone else ever get this in their log output?
Is it a known bug in Trinidad? We're using Trinidad 1.0.1, with Sun App Server 8.2

Any info would be appreciated.
Thanks,
Darren.

Error:

[#|2007-10-17T18:52:35.031+0100|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.web|_ThreadID=27;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 11 is out of bounds. It should be between 0 and 3
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:399)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer._getSelectedIndex(SimpleSelectOneRenderer.java:466)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:261)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:109)
            at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:318)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:142)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:194)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:120)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241)
 
P Please consider the environment before printing this email
_________________________________________________________ 
 
1. The information contained in this E-mail, including any files transmitted with it, is confidential and may be legally privileged. This E-mail is intended only for the personal attention of the stated addressee(s). Any access to this E-mail, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail or any files transmitted with it. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this E-mail without the permission of the sender.
 
2. The views expressed in this E-mail are those of the author, and do not necessarily represent the views of AMT-SYBEX. Internet communications are not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.
 
AMT-SYBEX Limited is a UK company, registration number GB03036807 at address The Spirella Building, Bridge Road, Letchworth, SG6 4ET. 
AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
_________________________________________________________

Re: Tomhawk DataScroller

Posted by simon <si...@chello.at>.
The other cause might be using component-bindings that point to beans
that are not request-scoped, particularly as you say that it happens
when you revisit the view. I suggest you check for "binding" attributes
in your pages.

On Fri, 2007-10-19 at 13:55 -0400, SJain@SperianProtection.com wrote:
> 
> No , we are using pure JSF , there are no loops . 
> 
> For the first time the page works fine with the datascroller . error
> come when you go to another page & come back to the page with the
> DataScroller . 
> I am using MyFaces 1.1.5 & Tomhawk 1.1.5 . What version are you
> using ? 

> 
> Shipra Jain
> 
> 
> 
> simon <si...@chello.at> 
> 
> 10/19/2007 01:23 PM 
>          Please respond to
>        "MyFaces Discussion"
>     <us...@myfaces.apache.org>
> 
> 
> 
> 
>                To
> MyFaces
> Discussion
> <us...@myfaces.apache.org> 
>                cc
> 
>           Subject
> Re: Tomhawk
> DataScroller
> 
> 
> 
> 
> 
> 
> 
> 
> On Fri, 2007-10-19 at 12:17 -0400, SJain@SperianProtection.com wrote:
> > 
> > Hi All 
> > 
> > Have any one used Tomhawk DataScroller ?   I am getting duplicate id
> > error , even tough there is no duplicate id. 
> 
> Yes, I'm using it and have no problem.
> 
> Are you perhaps using JSF1.1 + jsp, and using c:if or c:forEach
> somewhere (not necessarily wrapping this component)? That is the
> primary
> cause of duplicated ids I believe.
> 
> Regards,
> 
> Simon
> 
> 
> 


Re: Tomhawk DataScroller

Posted by SJ...@SperianProtection.com.
No , we are using pure JSF , there are no loops . 

For the first time the page works fine with the datascroller . error come 
when you go to another page & come back to the page with the DataScroller 
. 
I am using MyFaces 1.1.5 & Tomhawk 1.1.5 . What version are you using ?

Shipra Jain




simon <si...@chello.at> 
10/19/2007 01:23 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
MyFaces Discussion <us...@myfaces.apache.org>
cc

Subject
Re: Tomhawk DataScroller






On Fri, 2007-10-19 at 12:17 -0400, SJain@SperianProtection.com wrote:
> 
> Hi All 
> 
> Have any one used Tomhawk DataScroller ?   I am getting duplicate id
> error , even tough there is no duplicate id. 

Yes, I'm using it and have no problem.

Are you perhaps using JSF1.1 + jsp, and using c:if or c:forEach
somewhere (not necessarily wrapping this component)? That is the primary
cause of duplicated ids I believe.

Regards,

Simon




Re: Tomhawk DataScroller

Posted by simon <si...@chello.at>.
On Fri, 2007-10-19 at 12:17 -0400, SJain@SperianProtection.com wrote:
> 
> Hi All 
> 
> Have any one used Tomhawk DataScroller ?   I am getting duplicate id
> error , even tough there is no duplicate id. 

Yes, I'm using it and have no problem.

Are you perhaps using JSF1.1 + jsp, and using c:if or c:forEach
somewhere (not necessarily wrapping this component)? That is the primary
cause of duplicated ids I believe.

Regards,

Simon



Tomhawk DataScroller

Posted by SJ...@SperianProtection.com.
Hi All

Have any one used Tomhawk DataScroller ?   I am getting duplicate id error 
, even tough there is no duplicate id.

 thrown : java.lang.IllegalStateException: Client-id : 
trade_show_paginatorfirst is duplicated in the faces tree. Component : 
TradeShowViewForm:trade_show_pag
inatorfirst, path: {Component-Path : [Class: 
org.apache.shale.view.faces.ShaleViewRoot,ViewId: 
/jsp/tradeshow/TradeShowView.jsp][Class: javax.faces.component.
html.HtmlForm,Id: TradeShowViewForm][Class: 
org.apache.myfaces.component.html.ext.HtmlPanelGrid,Id: 
_idJsp49PC_7_TTRSDFH2008J502LOF8MRP30I3_][Class: org.apach
e.myfaces.custom.datascroller.HtmlDataScroller,Id: 
trade_show_paginator][Class: 
javax.faces.component.html.HtmlCommandLink,Id: trade_show_paginatorfirst]}
        at 
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled 
Code))
        at 
org.apache.myfaces.application.jsp.JspStateManagerImpl.checkForDuplicateIds(JspStateManagerImpl.java(Compiled 
Code))


The tomhawk version we are using is 1.1.5 . In portal application.   The 
jsp looks like

<t:dataScroller id="trade_show_paginator"
                      for="trade_show"
                      fastStep="10"
                      pageCountVar="pageCount"
                      pageIndexVar="pageIndex"
                      styleClass="scroller"
                      paginator="true"
                      paginatorMaxPages="10"
                      paginatorTableClass="paginator"
                      paginatorActiveColumnStyle="font-weight:bold;"
                      immediate="true"
                      actionListener="#{TradeShowListForm.scrollerAction}" 
>
            <f:facet name="first" >
          <t:graphicImage id="tr_first" url="/images/arrow-first.gif" 
border="1" />
        </f:facet>
        <f:facet name="last">
          <t:graphicImage id="tr_last" url="/images/arrow-last.gif" border
="1" />
        </f:facet>
        <f:facet name="previous">
          <t:graphicImage id="tr_previous" url=
"/images/arrow-previous.gif" border="1" />
        </f:facet>
        <f:facet name="next">
          <t:graphicImage id="tr_next" url="/images/arrow-next.gif" border
="1" />
        </f:facet>
        <f:facet name="fastforward">
          <t:graphicImage  id="tr_fastforward" url="/images/arrow-ff.gif" 
border="1" />
        </f:facet>
        <f:facet name="fastrewind">
          <t:graphicImage id="tr_fastrewind" url="/images/arrow-fr.gif" 
border="1" />
        </f:facet>
      </t:dataScroller> 

Shipra Jain
Lead System Software Engineer
Sperian 
900 Douglas Pike
Smithfield, RI 02917
401-757-2332
http://www.sperianprotection.com

Re: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Posted by Abhi <em...@gmail.com>.
Is there any value common in the second drop down between the two selections
of first drop down ?

On 10/18/07, Darren McEntee <da...@amt-sybex.com> wrote:
>
> Hi,
>
> We're using Trinidad v1.0.1. We seem to be getting an issue with an
> IndexOutOfBoundsException on tr:selectOneChoice dropdowns.
> We have two dropdowns, of which the second dropdown is populated (from DB)
> from the choice on the first dropdown.
>
> What seems to be happening is that every so often, we get this
> IndexOutOfBoundsException error on a selection.
> For example we select the first option from dropdown 1, which populates 10
> values in dropdown 2. If we go back and select a different option in
> dropdown 1, which populates 4 values in dropdown 2 it causes this error. Its
> difficult to reproduce the error as it occurs sporadically, and not
> everytime.
>
> The error is attached below. Does anyone else ever get this in their log
> output?
> Is it a known bug in Trinidad? We're using Trinidad 1.0.1, with Sun App
> Server 8.2
>
> Any info would be appreciated.
> Thanks,
> Darren.
>
> Error:
>
> [#|2007-10-17T18:52:
> 35.031+0100|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.web|_ThreadID=27;|StandardWrapperValve[Faces
> Servlet]: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 11
> is out of bounds. It should be between 0 and 3
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex
> (SimpleSelectOneRenderer.java:399)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer._getSelectedIndex
> (SimpleSelectOneRenderer.java:466)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement
> (SimpleSelectOneRenderer.java:261)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll
> (FormElementRenderer.java:109)
>             at
> org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(
> CoreRenderer.java:318)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents
> (InputLabelAndMessageRenderer.java:142)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll
> (LabelAndMessageRenderer.java:194)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll
> (InputLabelAndMessageRenderer.java:120)
>             at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> CoreRenderer.java:208)
>             at
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> UIXComponentBase.java:694)
>             at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild
> (CoreRenderer.java:287)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids
> (ColumnRenderer.java:151)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids
> (ColumnRenderer.java:168)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD
> (ColumnRenderer.java:330)
>             at
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode
> (ColumnRenderer.java:241)
>
> P Please consider the environment before printing this email
> _________________________________________________________
>
> 1. The information contained in this E-mail, including any files
> transmitted with it, is confidential and may be legally privileged. This
> E-mail is intended only for the personal attention of the stated
> addressee(s). Any access to this E-mail, including any files transmitted
> with it, by any other person is unauthorised. If you are not an addressee,
> you must not disclose, copy, circulate or in any other way use or rely on
> the information contained in this E-mail or any files transmitted with it.
> Such unauthorised use may be unlawful. If you have received this E-mail in
> error, please inform the sender immediately and delete it and all copies
> from your system. You may not forward this E-mail without the permission of
> the sender.
>
> 2. The views expressed in this E-mail are those of the author, and do not
> necessarily represent the views of AMT-SYBEX. Internet communications are
> not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for
> the contents of this message nor for any damage caused by viruses.
>
> AMT-SYBEX Limited is a UK company, registration number GB03036807 at
> address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
> AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at
> address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
> For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
> _________________________________________________________
>
>

Re: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Posted by Matthias Wessendorf <ma...@apache.org>.
looks like the index is large than your number of selectItems

can you post some more infos ?

(or did you try valuePassThru="true" on the selectOnechoice ?)

On 10/18/07, Darren McEntee <da...@amt-sybex.com> wrote:
> Hi,
>
> We're using Trinidad v1.0.1. We seem to be getting an issue with an IndexOutOfBoundsException on tr:selectOneChoice dropdowns.
> We have two dropdowns, of which the second dropdown is populated (from DB) from the choice on the first dropdown.
>
> What seems to be happening is that every so often, we get this IndexOutOfBoundsException error on a selection.
> For example we select the first option from dropdown 1, which populates 10 values in dropdown 2. If we go back and select a different option in dropdown 1, which populates 4 values in dropdown 2 it causes this error. Its difficult to reproduce the error as it occurs sporadically, and not everytime.
>
> The error is attached below. Does anyone else ever get this in their log output?
> Is it a known bug in Trinidad? We're using Trinidad 1.0.1, with Sun App Server 8.2
>
> Any info would be appreciated.
> Thanks,
> Darren.
>
> Error:
>
> [#|2007-10-17T18:52:35.031+0100|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.web|_ThreadID=27;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
> java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 11 is out of bounds. It should be between 0 and 3
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:399)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer._getSelectedIndex(SimpleSelectOneRenderer.java:466)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:261)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:109)
>             at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:318)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:142)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:194)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:120)
>             at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
>             at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
>             at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330)
>             at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241)
>
> P Please consider the environment before printing this email
> _________________________________________________________
>
> 1. The information contained in this E-mail, including any files transmitted with it, is confidential and may be legally privileged. This E-mail is intended only for the personal attention of the stated addressee(s). Any access to this E-mail, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail or any files transmitted with it. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this E-mail without the permission of the sender.
>
> 2. The views expressed in this E-mail are those of the author, and do not necessarily represent the views of AMT-SYBEX. Internet communications are not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.
>
> AMT-SYBEX Limited is a UK company, registration number GB03036807 at address The Spirella Building, Bridge Road, Letchworth, SG6 4ET.
> AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
> For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
> _________________________________________________________
>
>


-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org

RE: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Posted by "Perkins, Nate-P63196" <Na...@gdc4s.com>.
We have had a similar, sporadic problem.  We found it could be avoided by placing our SelectItem lists in page flow scope.  Hope that helps. 


Nate Perkins
General Dynamics C4 Systems

>This email message is for the sole use of the intended recipient(s) and may contain GDC4S
> confidential or privileged information. Any unauthorized review, use, disclosure or distribution
> is prohibited. If you are not an intended recipient, please contact the sender by reply email and
> destroy all copies of the original message.
>

-----Original Message-----
From: Darren McEntee [mailto:darren.McEntee@amt-sybex.com] 
Sent: Thursday, October 18, 2007 1:24 AM
To: MyFaces Discussion
Subject: [Trinidad] IndexOutOfBoundsException on tr:selectOneChoice dropdowns.

Hi, 

We're using Trinidad v1.0.1. We seem to be getting an issue with an IndexOutOfBoundsException on tr:selectOneChoice dropdowns.
We have two dropdowns, of which the second dropdown is populated (from DB) from the choice on the first dropdown.

What seems to be happening is that every so often, we get this IndexOutOfBoundsException error on a selection.
For example we select the first option from dropdown 1, which populates 10 values in dropdown 2. If we go back and select a different option in dropdown 1, which populates 4 values in dropdown 2 it causes this error. Its difficult to reproduce the error as it occurs sporadically, and not everytime.

The error is attached below. Does anyone else ever get this in their log output?
Is it a known bug in Trinidad? We're using Trinidad 1.0.1, with Sun App Server 8.2

Any info would be appreciated.
Thanks,
Darren.

Error:

[#|2007-10-17T18:52:35.031+0100|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.web|_ThreadID=27;|StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.IndexOutOfBoundsException: SelectOne submittedValue's index 11 is out of bounds. It should be between 0 and 3
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.__getIndex(SimpleSelectOneRenderer.java:399)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer._getSelectedIndex(SimpleSelectOneRenderer.java:466)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:261)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:109)
            at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:318)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:142)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:194)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:120)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:208)
            at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:694)
            at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:287)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer.renderKids(ColumnRenderer.java:151)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderKids(ColumnRenderer.java:168)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderTD(ColumnRenderer.java:330)
            at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ColumnRenderer._renderDataMode(ColumnRenderer.java:241)
 
P Please consider the environment before printing this email
_________________________________________________________ 
 
1. The information contained in this E-mail, including any files transmitted with it, is confidential and may be legally privileged. This E-mail is intended only for the personal attention of the stated addressee(s). Any access to this E-mail, including any files transmitted with it, by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail or any files transmitted with it. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform the sender immediately and delete it and all copies from your system. You may not forward this E-mail without the permission of the sender.
 
2. The views expressed in this E-mail are those of the author, and do not necessarily represent the views of AMT-SYBEX. Internet communications are not secure and AMT-SYBEX cannot, therefore, accept legal responsibility for the contents of this message nor for any damage caused by viruses.
 
AMT-SYBEX Limited is a UK company, registration number GB03036807 at address The Spirella Building, Bridge Road, Letchworth, SG6 4ET. 
AMT-SYBEX (NI) Limited is a UK company, registration number NI024104 at address Edgewater Office Park, Edgewater Rd, Belfast, BT3 9JQ.
For more information on the AMT-SYBEX Group visit http://www.amt-sybex.com
_________________________________________________________