PagingScrollTable supports complex headers with colSpans and rowSpans, so it isn't always possible to map the sorted column back to the row element. applySortedColumnIndicator was added as a workaround. I'll look at the sort list issue as well.
Thanks, John LaBanca [email protected] On Thu, May 7, 2009 at 3:34 PM, jay <[email protected]> wrote: > > Ah. I will look at doing both :-) > > In the mean time, here's the solution I just stumbled upon. In my > derived class: > > int index = ...; // figure out the column that we're sorted by. > Element headerElem = getHeaderTable().getFlexCellFormatter > ().getElement( 0, index ); > applySortedColumnIndicator( headerElem, > tableReportComponentDTO.sortAscending ); > > > I'd suggest adding the following method to PagingScrollTable: > > public void setColumnSortList( > TableModelHelper.ColumnSortList sortList > ) { > getDataTable().setColumnSortList( sortList, true ); > > Element headerElem = getHeaderTable().getFlexCellFormatter > ().getElement( 0, sortList.getPrimaryColumn() ); > applySortedColumnIndicator( headerElem, sortList.isPrimaryAscending > () ); > } > > > jay > > > On May 7, 12:10 pm, Isaac Truett <[email protected]> wrote: > > Hi Jay, > > > > That does sound like a bug. Opening an issue in the tracker is a good > > idea. Issues with patches attached are even better. > > > > - Isaac > > > > > > > > On Thu, May 7, 2009 at 3:02 PM, jay <[email protected]> wrote: > > > > > I'm starting to use the gen2 incubator table widgets. I hope I can > > > provide some valuable feedback in the days and weeks to come... > > > > > The first issue I've run into that I cannot seem to work around: When > > > I load my data into the PagingScrollTable, it is already sorted (in > > > fact, all of our data uses server-side sorting). I worked out that in > > > order to get the sorting indicator displayed, I should call: > > > > > ColumnSortList sortList = ...; > > > getDataTable().setColumnSortList( sortList, true ); > > > > > I can see that this fires the event which PagingScrollTable listens > > > for. However, when PagingScrollTable gets the event, it checks to see > > > if the sortedColumnTrigger member is null. In this case, it is, > > > because the only way for that (private) member to be set is in > > > reaction to a ONMOUSEUP event. > > > > > What's the best way to resolve this? Should I file a bug? Submit a > > > patch? Something else? > > > > > thanks, > > > > > jay > > > --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---
