incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wessendorf" <mat...@apache.org>
Subject Re: IndexOutOfBoundsException in tr:table detailStamp
Date Fri, 26 Jan 2007 08:43:27 GMT
something like

      <f:facet name="detailStamp" >


             <ui:fragment>
             <div>FFF<tr:outputText value="Jo"/></div>
      </ui:fragment>

      </f:facet>

worked

On 1/26/07, Adam Winer <awiner@gmail.com> wrote:
> OK, should be fixed.  Tested it over in JSP land (I know,
> sad that I'm not on Facelets at the moment) with:
>
>             <tr:table allDetailsEnabled="true" var="row"
>                       value="#{periodicTable.tableData}" rows="10">
>               <tr:column headerText="Name">
>                 <tr:outputText value="#{row.name}"/>
>               </tr:column>
>               <f:facet name="detailStamp" >
>                <tr:panelGroupLayout>
>                 <f:verbatim>&lt;br&gt;</f:verbatim>
>                   <tr:outputText value="Foo"/>
>                   <tr:inputText/>
>                   <tr:outputText value="Bar"/>
>                 <f:verbatim>&lt;br&gt;</f:verbatim>
>                </tr:panelGroupLayout>
>               </f:facet>
>             </tr:table>
>
> -- Adam
>
>
> On 1/25/07, Adam Winer <awiner@gmail.com> wrote:
> >
> > I think I know what's going on...
> >
> > -- Adam
> >
> >
> > On 1/25/07, noah <iamnoah@gmail.com> wrote:
> > >
> > > Ok, new twist:
> > >
> > >       <trh:body>
> > >          <tr:form>
> > >             <tr:table value="#{ testBean.list}" var="item"
> > > allDetailsEnabled="true">
> > >                <f:facet name="detailStamp">
> > >                   <ui:fragment>
> > >                      <div>
> > >                         <h:outputLabel for="foo" value="Foo"/>
> > >                         <h:inputText value="#{item}" />
> > >                      </div>
> > >                   </ui:fragment>
> > >                </f:facet>
> > >                <tr:column headerText="Foo Value">
> > >                   #{item}
> > >                </tr:column>
> > >             </tr:table>
> > >          </tr:form>
> > >       </trh:body>
> > >
> > > Causes a ClassCastException (below).  If I take away the <div>, no
> > > exception, so I'm guessing the problem is with transient components
> > > like inline HTML.
> > >
> > > java.lang.ClassCastException :
> > > javax.faces.component.html.HtmlOutputLabel
> > >         at
> > > org.apache.myfaces.trinidad.component.StampState$EVHState.restoreRowState
> > > (StampState.java:342)
> > >         at
> > > org.apache.myfaces.trinidad.component.StampState.restoreStampState (
> > > StampState.java:118)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState(
> > > UIXCollection.java:819)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(
> > > UIXTable.java :338)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState(
> > > UIXCollection.java:840)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(
> > > UIXTable.java:338)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState(
> > > UIXCollection.java:1141)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange(
> > > UIXCollection.java:711)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex (
> > > UIXCollection.java:409)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableRenderingContext
> > > .<init>(TableRenderingContext.java:56)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.createRenderingContext(
> > > TableRenderer.java:405)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.encodeAll
> > > (TableRenderer.java:250)
> > >         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> > > CoreRenderer.java :184)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> > > UIXComponentBase.java:700)
> > >         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd
> > > (UIXCollection.java:495)
> > >         at
> > > org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(
> > > RenderUtils.java:70)
> > >         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(
> > > CoreRenderer.java:258)
> > >         at
> > > org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren (
> > > CoreRenderer.java:280)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent
> > > (PanelPartialRootRenderer.java:73)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(
> > > BodyRenderer.java:137)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll
> > > (PanelPartialRootRenderer.java:153)
> > >         at
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(
> > > BodyRenderer.java:79)
> > >         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(
> > > CoreRenderer.java:184)
> > >         at
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(
> > > UIXComponentBase.java:700)
> > >         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> > > ComponentSupport.java:242)
> > >         at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(
> > > ComponentSupport.java:239)
> > >         at com.sun.facelets.FaceletViewHandler.renderView (
> > > FaceletViewHandler.java:580)
> > >         at
> > > org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView
> > > (ViewHandlerImpl.java:181)
> > >         at org.apache.myfaces.lifecycle.LifecycleImpl.render(
> > > LifecycleImpl.java :384)
> > >         at javax.faces.webapp.FacesServlet.service(FacesServlet.java
> > > :138)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:252)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > > ApplicationFilterChain.java:173)
> > >         at
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter
> > > (TrinidadFilterImpl.java:329)
> > >         at
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(
> > > TrinidadFilterImpl.java:293)
> > >         at
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
> > > TrinidadFilterImpl.java:216)
> > >         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(
> > > TrinidadFilter.java :93)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at
> > > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter
> > > (SecurityContextHolderAwareRequestFilter.java:81)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java :202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(
> > > FilterSecurityInterceptor.java:107)
> > >         at
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(
> > > FilterSecurityInterceptor.java:72)
> > >         at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > FilterToBeanProxy.java:90)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter (
> > > ExceptionTranslationFilter.java:110)
> > >         at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > FilterToBeanProxy.java:90)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java :202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(
> > > AbstractProcessingFilter.java:216)
> > >         at org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > FilterToBeanProxy.java:90)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter (
> > > ApplicationFilterChain.java:173)
> > >         at
> > > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> > > HttpSessionContextIntegrationFilter.java:195)
> > >         at org.acegisecurity.util.FilterToBeanProxy.doFilter (
> > > FilterToBeanProxy.java:90)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java :173)
> > >         at
> > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
> > > (OpenSessionInViewFilter.java:174)
> > >         at org.springframework.web.filter.OncePerRequestFilter.doFilter(
> > > OncePerRequestFilter.java :76)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> > > ExtensionsFilter.java:144)
> > >         at
> > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> > > ApplicationFilterChain.java:202)
> > >         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> > > ApplicationFilterChain.java:173)
> > >         at org.apache.catalina.core.StandardWrapperValve.invoke(
> > > StandardWrapperValve.java:213)
> > >         at org.apache.catalina.core.StandardContextValve.invoke (
> > > StandardContextValve.java:178)
> > >         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
> > > AuthenticatorBase.java:432)
> > >         at org.apache.catalina.core.StandardHostValve.invoke(
> > > StandardHostValve.java:126)
> > >         at org.apache.catalina.valves.ErrorReportValve.invoke(
> > > ErrorReportValve.java:105)
> > >         at org.apache.catalina.core.StandardEngineValve.invoke(
> > > StandardEngineValve.java:107)
> > >         at org.apache.catalina.connector.CoyoteAdapter.service (
> > > CoyoteAdapter.java:148)
> > >         at org.apache.coyote.http11.Http11Processor.process(
> > > Http11Processor.java:869)
> > >         at
> > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
> > > (Http11BaseProtocol.java :664)
> > >         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> > > PoolTcpEndpoint.java:527)
> > >         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> > > LeaderFollowerWorkerThread.java:80)
> > >         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
> > > (ThreadPool.java:684)
> > >         at java.lang.Thread.run(Thread.java:595)
> > >
> > >
> > > On 1/24/07, Adam Winer <awiner@gmail.com > wrote:
> > > > What a coincidence - it's a Trinidad bug that I fixed
> > > > about 2 hours ago!  If you download the absolute
> > > > latest code and rebuild, the problem should be gone.
> > > >
> > > > -- Adam
> > > >
> > > >
> > > > On 1/24/07, noah <iamnoah@gmail.com> wrote:
> > > > >
> > > > > This may be a Facelets issue, I'm not sure.
> > > > >
> > > > > Simple Example:
> > > > >
> > > > > <tr:table allDetailsEnabled="true" ...>
> > > > >   <f:facet name="detailStamp">
> > > > >     <h:panelGroup>
> > > > >       <h:outputText value="foo"/>
> > > > >       <br/>
> > > > >       <h:outputText value="bar"/>
> > > > >     </h:panelgroup>
> > > > >   </f:facet>
> > > > >   ...
> > > > >
> > > > > That gets me a index out of bounds exception (trace below).  Any
> > > idea
> > > > > what's going on or how to fix it?
> > > > >
> > > > > My Setup:
> > > > > Facelets 1.1.11
> > > > > MyFaces & Tomahawk 1.1.3
> > > > > Trinidad m1-SNAPSHOT
> > > > >
> > > > > exception:
> > > > >
> > > > > javax.servlet.ServletException: Index: 2, Size: 2
> > > > >         javax.faces.webapp.FacesServlet.service(FacesServlet.java
> > > :152)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter
> > > > > (TrinidadFilterImpl.java:327)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl
> > > > > (TrinidadFilterImpl.java:291)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter (
> > > > > TrinidadFilterImpl.java
> > > > > :214)
> > > > >         org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(
> > > > > TrinidadFilter.java:90)
> > > > >
> > > > >
> > > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter
> > > > > (SecurityContextHolderAwareRequestFilter.java:81)
> > > > >
> > > > >
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(
> > > > > FilterSecurityInterceptor.java:107)
> > > > >
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter
> > > > > (FilterSecurityInterceptor.java:72)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter
> > > > > (FilterToBeanProxy.java :90)
> > > > >         org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(
> > > > > ExceptionTranslationFilter.java:110)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > > > FilterToBeanProxy.java :90)
> > > > >         org.acegisecurity.ui.AbstractProcessingFilter.doFilter
> > > > > (AbstractProcessingFilter.java:216)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > > > FilterToBeanProxy.java :90)
> > > > >
> > > > >
> > > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> > > > > HttpSessionContextIntegrationFilter.java
> > > > > :195)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter (
> > > > > FilterToBeanProxy.java:90)
> > > > >
> > > > >
> > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
> > > > > (OpenSessionInViewFilter.java:174)
> > > > >         org.springframework.web.filter.OncePerRequestFilter.doFilter
> > > > > (OncePerRequestFilter.java:76)
> > > > >         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(
> > > > > ExtensionsFilter.java:144)
> > > > >
> > > > > root cause
> > > > >
> > > > > java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
> > > > >         java.util.ArrayList.RangeCheck
> > > > > (ArrayList.java:546)
> > > > >         java.util.ArrayList.get(ArrayList.java:321)
> > > > >         javax.faces.component._ComponentChildrenList.get
> > > > > (_ComponentChildrenList.java:42)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState
> > > > > (UIXCollection.java:837)
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(
> > > > > UIXTable.java:323)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState (
> > > > > UIXCollection.java:1110)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange
> > > > > (UIXCollection.java:729)
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection.setRowKey (
> > > > > UIXCollection.java:388)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection.setCurrencyString(
> > > > > UIXCollection.java:639)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSelectManyRenderer._setDeltas
> > > > > (TableSelectManyRenderer.java:147)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableSelectManyRenderer.decode
> > > > > (TableSelectManyRenderer.java:109)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.decodeSelection
> > > > > (TableRenderer.java:125)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.decode
> > > > > (TableRenderer.java:89)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(
> > > > > UIXComponentBase.java
> > > > > :1011)
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.decode (
> > > > > UIXComponentBase.java:623)
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXCollection.processDecodes
> > > > > (UIXCollection.java:146)
> > > > >         javax.faces.component.UIComponentBase.processDecodes
> > > > > (UIComponentBase.java:602)
> > > > >
> > > > >
> > > org.apache.myfaces.custom.tabbedpane.HtmlPanelTabbedPane.processDecodes(
> > > > > HtmlPanelTabbedPane.java:65)
> > > > >         javax.faces.component.UIForm.processDecodes (UIForm.java:53)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl
> > > > > (UIXComponentBase.java:889)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren (
> > > > > UIXComponentBase.java:874)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(
> > > > > UIXComponentBase.java
> > > > > :725)
> > > > >         javax.faces.component.UIComponentBase.processDecodes (
> > > > > UIComponentBase.java:602)
> > > > >         javax.faces.component.UIViewRoot.processDecodes(
> > > UIViewRoot.java
> > > > > :135)
> > > > >
> > > org.apache.myfaces.lifecycle.LifecycleImpl.applyRequestValues
> > > > > (LifecycleImpl.java:219)
> > > > >         org.apache.myfaces.lifecycle.LifecycleImpl.execute(
> > > > > LifecycleImpl.java:71)
> > > > >         javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter
> > > > > (TrinidadFilterImpl.java:327)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl
> > > > > (TrinidadFilterImpl.java:291)
> > > > >
> > > > >
> > > org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(
> > > > > TrinidadFilterImpl.java
> > > > > :214)
> > > > >         org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter
(
> > > > > TrinidadFilter.java:90)
> > > > >
> > > > >
> > > org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter
> > > > > (SecurityContextHolderAwareRequestFilter.java:81)
> > > > >
> > > > >
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(
> > > > > FilterSecurityInterceptor.java:107)
> > > > >
> > > org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter
> > > > > (FilterSecurityInterceptor.java :72)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter
> > > > > (FilterToBeanProxy.java:90)
> > > > >         org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(
> > > > > ExceptionTranslationFilter.java :110)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > > > FilterToBeanProxy.java:90)
> > > > >         org.acegisecurity.ui.AbstractProcessingFilter.doFilter
> > > > > (AbstractProcessingFilter.java :216)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > > > FilterToBeanProxy.java:90)
> > > > >
> > > > >
> > > org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(
> > > > > HttpSessionContextIntegrationFilter.java
> > > > > :195)
> > > > >         org.acegisecurity.util.FilterToBeanProxy.doFilter(
> > > > > FilterToBeanProxy.java:90)
> > > > >
> > > > >
> > > org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal
> > > > > (OpenSessionInViewFilter.java:174)
> > > > >         org.springframework.web.filter.OncePerRequestFilter.doFilter
> > > > > (OncePerRequestFilter.java:76)
> > > > >         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter
(
> > > > > ExtensionsFilter.java:144)
> > > > >
> > > >
> > > >
> > >
> >
> >
>
>


-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Mime
View raw message