Thanks Igor, I should have figured that out from the source.

Just in case this helps someone else later, my problem was that I had been
expecting the setSort method on SortableDataProvider to be called with the
new sort state, so I overrode the method and used that as an opportunity to
change the sort in my custom SortableDataProvider.  It turns out that the
real method that is called is setSortState, so I now decided to just perform
the sort at the very beginning of the iterator() method, by examining
getSort().isAscending() and getSort().getProperty().

BTW, I'm really excited about what I've seen over my first 3 days of looking
at Wicket.  Nice job everyone!

Thanks,
Matt



igor.vaynberg wrote:
> 
> it is OrderByLink used inside OrderByBorder that sets the sort state.
> 
> see OrderByLink.sort() which is called from OrderByLink.onclick()
> 
> -igor
> 
> 
> On 1/15/07, MClark00 <[EMAIL PROTECTED]> wrote:
>>
>>
>> Sorry, to clarify my problem, it does sort initially correctly, but while
>> clicking the header changes the order by arrow (up or down), the sort
>> direction of the data does not change.  In fact, my data provider's
>> setSort
>> methods never get called when I click to change the sort.
>>
>> Thanks,
>> Matt
>>
>>
>> MClark00 wrote:
>> >
>> > Hi,
>> >
>> > I'm trying to mimic the Data Table example in the Repeaters examples,
>> and
>> > can't get the sort to work.  I looked at DataTablePage.java, and it
>> looks
>> > like it's just using the stock DefaultDataTable.  Once I dug down
>> through
>> > the 1.2.4 code a little, I noticed that the OrderByBorder doesn't
>> actually
>> > implement the sort direction change, which explains why mine doesn't
>> sort.
>> >
>> > My question is: why is the DataTablePage.java sorting correctly?  Is it
>> > using 2.X?
>> >
>> > Sorry for the simple question, but I just want to make sure there isn't
>> > some subtlety with the example that I'm missing that I could use in
>> 1.2.4
>> > to get the sort working.
>> >
>> > Thanks,
>> > Matt
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Wicket-Examples---Repeater-View---Data-Table-Example---How-is-it-sorting--tf3016996.html#a8378534
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-Examples---Repeater-View---Data-Table-Example---How-is-it-sorting--tf3016996.html#a8379926
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to