[ http://jira.codehaus.org/browse/DISPL-237?page=all ] fabrizio giustina closed DISPL-237: -----------------------------------
Resolution: Fixed Fix Version: 1.1 the first NPE should now be fixed in CVS, no clue on how the second exception could be generated. The current code in HEAD is not very stable, but please let me know if you have a change to give it a try and see if the problem is solved. > 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