[ http://jira.codehaus.org/browse/DISPL-237?page=comments#action_46231 ] 

Paulo Teles commented on DISPL-237:
-----------------------------------

Fabrizio,

Sorry to bother you with this issue, I got today the version in the CVS 
repository, but i am still with the problem when i try to use sort with 
DisplayTag. The first NPE doesn´t happen again but the problem with the Array 
continues.

I am using the current version of CVS, with the Oracle Application Server (IAS) 
and Struts.

And I am trying to give you more clues about this issue. When i use 
sortable='true' and defaultsort='1' for example, the .jsp appears perfectly in 
the first time, but if i make a second request it gives that error.

[ServletException in:/tiles/layout/GridPesquisa.jsp] Index: 0, Size: 0' 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at 
java.util.ArrayList.RangeCheck(ArrayList.java:507) at 
java.util.ArrayList.get(ArrayList.java:324) at 
org.displaytag.tags.TableTag.addCell(TableTag.java:704) at 
org.displaytag.tags.ColumnTag.doEndTag(ColumnTag.java:708) at 
_tiles._layout._GridPesquisa._jspService(_GridPesquisa.java:134)

When i debug the application i saw that the error is when it enter in the 
method addCell in TableTag.java.

Let me know if with this you can track this issue.

> Problems using sorting, defaultsort with version of Displaytag in CVS
> ---------------------------------------------------------------------
>
>          Key: DISPL-237
>          URL: http://jira.codehaus.org/browse/DISPL-237
>      Project: DisplayTag
>         Type: Bug
>   Components: Paging/Sorting
>      Fix For: 1.1

>
>
> I am having a problem with sorting using the current version of displaytag in 
> CVS.
> Here is my code:
> <c:if test="${sessionScope.listaProcesso!=null}">
>           <display:table name="sessionScope.listaProcesso" pagesize="10" 
> requestURI="geraPesquisaProcessoGenerica.do?evento=Paginar" class="lista" 
> sort="page" defaultsort="1">
>             <display:column titleKey="label.manter.processo.numero.processo" 
> property="processoFormatado" paramId="idObj" paramProperty="id" 
> sortable="true"/>
>             <display:column titleKey="label.manter.processo.data.inicio" 
> property="dataInicio" paramId="idObj" paramProperty="id" 
> decorator="com.synos.egov.licitacao.controller.decorator.DataDecorator" />
>             <display:column titleKey="label.manter.processo.aglutinacao" 
> property="aglutinacao.aglutinacaoFormatada" paramId="idObj" 
> paramProperty="id"/>
>             <display:column 
> titleKey="label.manter.processo.forma.contratacao" 
> property="formaContratacao.descricao" paramId="idObj" paramProperty="id"/>
>             <display:column titleKey="label.manter.processo.tipo.contratacao" 
> property="tipoContratacao.descricao" paramId="idObj" paramProperty="id"/>
>             <display:column titleKey="label.manter.processo.situacao" 
> property="situacao.descricao" paramId="idObj" paramProperty="id"/>
>           </display:table>
>       </c:if>
> When i access the page for the first time it runs perfectly. But in the next 
> times I have the following errors.
> java.lang.NullPointerException
>       at 
> org.displaytag.model.RowSorter.checkNullsAndCompare(RowSorter.java:176)
>       at org.displaytag.model.RowSorter.compare(RowSorter.java:144)
>       at java.util.Arrays.mergeSort(Arrays.java:1278)
>       at java.util.Arrays.sort(Arrays.java:1219)
>       at java.util.Collections.sort(Collections.java:155)
>       at org.displaytag.model.TableModel.sortRowList(TableModel.java:406)
>       at org.displaytag.model.TableModel.sortPageList(TableModel.java:429)
>       at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1252)
>       at 
> _pages._GerarListaProcessoGenerica._jspService(GerarListaProcessoGenerica.jsp:76)
>       [/pages/GerarListaProcessoGenerica.jsp]
> and
> java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
>       at java.util.ArrayList.RangeCheck(ArrayList.java:507)
>       at java.util.ArrayList.get(ArrayList.java:324)
>       at org.displaytag.tags.TableTag.addCell(TableTag.java:704)
>       at org.displaytag.tags.ColumnTag.doEndTag(ColumnTag.java:708)
>       at 
> _pages._GerarListaProcessoGenerica._jspService(GerarListaProcessoGenerica.jsp:71)
>       [/pages/GerarListaProcessoGenerica.jsp]
> Someone have found that problem too? Or maybe i´m doing something wrong ?? If 
> someone can help me, i will apreciate.
> Thanks in advance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to