incubator-adffaces-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer (JIRA)" <adffaces-iss...@incubator.apache.org>
Subject [jira] Resolved: (ADFFACES-385) Strange Exception with UIXCollection using <t:table /> and own CollectionModel implementation
Date Sat, 14 Apr 2007 19:55:15 GMT

     [ https://issues.apache.org/jira/browse/ADFFACES-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Adam Winer resolved ADFFACES-385.
---------------------------------

    Resolution: Incomplete

I suspect I've finally fixed this bug.  Could you re-test with the latest snapshots?  However,
if it still reproduces, I'll need more information to reproduce the bug.  I doubt it has anything
to do with the collection model you've used.  It's probably just about the structure of components
inside the table.

> Strange Exception with UIXCollection using <t:table /> and own CollectionModel
implementation
> ---------------------------------------------------------------------------------------------
>
>                 Key: ADFFACES-385
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-385
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>         Environment: Windows XP SP2
> Tomcat 5.5.12
> MyFaces Snapshots
> Trinidad Snapshots
> facelets-1.1.12
>            Reporter: Felix Gonschorek
>         Assigned To: Adam Winer
>
> I implemented my own CollectionModel to support paging and sorting with Hibernate Criterias.
> The first view of my <t:table /> works well, but with subsequent requests, i get
an strange exception.
> i fixed this, with the attached patch. i don't know, if this is an bug with my CollectionModel
implementation or if this is an trinidad issue. I have seen in the SVN logs, that there has
been issues with the UIXCollection.restoreStamps() method, maybe one should have a look at
this.
> Thank you all for your great work!
> PATCH: (i have never contributed a patch to a project before, please excuse me if this
is not perfectly prepared)
> ===================================================================
> Index: C:/workspace/Trinidad/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
> ===================================================================
> --- C:/workspace/Trinidad/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
(revision 508869)
> +++ C:/workspace/Trinidad/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
(working copy)
> @@ -863,6 +863,9 @@
>      List<UIComponent> children = stamp.getChildren();
>      Object[] childStateArray = (Object[]) state[2];
>      int childIndex = 0;
> +    if (children.isEmpty()) {
> +        return;
> +    }
>      for(int i=0; i<childStateArray.length; i++)
>      {
>        Object childState = childStateArray[i];
> ===================================================================
> EXCEPTION:
> ===================================================================
> java.lang.IndexOutOfBoundsException: Index: 0
> 	at java.util.Collections$EmptyList.get(Unknown Source)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.restoreStampState(UIXCollection.java:873)
> 	at org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(UIXTable.java:338)
> 	at org.apache.myfaces.trinidad.component.StampState.restoreChildStampState(StampState.java:172)
> 	at org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(UIXTable.java:335)
> 	at org.apache.myfaces.trinidad.component.StampState.restoreChildStampState(StampState.java:172)
> 	at org.apache.myfaces.trinidad.component.UIXTable.restoreStampState(UIXTable.java:335)
> 	at org.apache.myfaces.trinidad.component.UIXCollection._restoreStampState(UIXCollection.java:1188)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.postRowDataChange(UIXCollection.java:741)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex(UIXCollection.java:439)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.loop(TableUtils.java:103)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils$RowLoop.run(TableUtils.java:76)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer._renderTableRows(DesktopTableRenderer.java:903)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableRows(DesktopTableRenderer.java:637)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.desktop.DesktopTableRenderer.renderTableContent(DesktopTableRenderer.java:363)
> 	at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer.encodeAll(TableRenderer.java:282)
> 	at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
> 	at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:701)
> 	at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:525)
> 	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:701)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:252)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
> 	at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
> 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
> 	at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
> 	at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
> 	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
> 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
> 	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:210)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:167)
> 	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:140)
> 	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.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:190)
> 	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.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.Http11AprProcessor.process(Http11AprProcessor.java:833)
> 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
> 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
> 	at java.lang.Thread.run(Unknown Source)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message