AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Patrick Angeles

I noticed this in the examples:

http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.AjaxDataTablePage

Changing the sort order does not seem to take you to the first page... I
stepped through the code, and it looks like it should work. Any ideas on how
to get this to work? Here's the relevant snippet from HeadersToolbar:

protected WebMarkupContainer newSortableHeader(String headerId, String
property,
ISortStateLocator locator)
{
return new OrderByBorder(headerId, property, locator)
{

private static final long serialVersionUID = 1L;

protected void onSortChanged()
{
getTable().setCurrentPage(0);
}
};

}

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12318280
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Igor Vaynberg
oh, and btw

http://wicketstuff.org/wicket13 is where the live examples are.
wicket-library isnt maintained and hasnt been for a while, not sure why its
still up and running.

-igor


On 8/24/07, Igor Vaynberg [EMAIL PROTECTED] wrote:

 thanks, fixed in trunk

 -igor


 On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  I noticed this in the examples:
 
 
  http://www.wicket-library.com/wicket-examples/repeater/?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.AjaxDataTablePage
 
  Changing the sort order does not seem to take you to the first page... I
  stepped through the code, and it looks like it should work. Any ideas on
  how
  to get this to work? Here's the relevant snippet from HeadersToolbar:
 
  protected WebMarkupContainer newSortableHeader(String headerId,
  String
  property,
  ISortStateLocator locator)
  {
  return new OrderByBorder(headerId, property, locator)
  {
 
  private static final long serialVersionUID = 1L;
 
 
  protected void onSortChanged()
  {
  getTable().setCurrentPage(0);
  }
  };
 
  }
 
  --
  View this message in context: 
  http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12318280
 
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Igor Vaynberg
i think it has been fixed since then. at least snapshots at
wicketstuff.org/wicket13 appear to be working fine.

-igor

On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:


 1.3-beta2


 igor.vaynberg wrote:
 
  i believe this was fixed a long time ago, what version are you seeing
 this
  with?
 
  -igor
 
 
  On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  That was fast :)
 
  Also, while we're on it, I just noticed that the NavigationToolbar text
  is
  off. For a list of 50 items with a pagesize of 5, it says: Showing 1
 to
  6
  of 50 (should say Showing 1 to 5 of 50).
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320251
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320800
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: AjaxFallbackDefaultDataTable... changing sort does not setCurrentPage to 0

2007-08-24 Thread Patrick Angeles

I'm not that intrepid so I think I'll just wait until beta3 to get those
fixes.

The extensions AjaxFallbackDefaultDataTable and related classes are
extremely nice, btw. It's allowed me to quickly set up list paging and
sorting in a way that would have taken me days using any other web
framework.

I do have some requests for refinement:

1. It'd be nice to have hard (not runtime generated) CSS classes or ids on
HTML elements for components like the NavigatorToolbar, etc. to allow for
easy styling via CSS. Something similar to the OddEvenItem concept applied
to the page links in the toolbar. I've found a way to style those links, but
it could be made easier.

2. Some way to hard-set the width for each column. It's visually distracting
to have the column widths change as you page through. This might be done via
CSS (maybe give each column a class or id) but this could also be done in
Java, for example:

ListIColumn columns = new ArrayListIColumn ();
columns.add (new SizedPropertyColumn (new Model (ID), id, id,
20%)) ;
columns.add (new SizedPropertyColumn (new Model (First Name),
firstName, firstName, 40%)) ;
columns.add (new SizedPropertyColumn (new Model (Last Name),
lastName, lastName, 40%)) ;

I'm still a newb, so I'm not sure which way is the wicket way...

Thanks,
- P


igor.vaynberg wrote:
 
 i think it has been fixed since then. at least snapshots at
 wicketstuff.org/wicket13 appear to be working fine.
 
 -igor
 
 On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:


 1.3-beta2


 igor.vaynberg wrote:
 
  i believe this was fixed a long time ago, what version are you seeing
 this
  with?
 
  -igor
 
 
  On 8/24/07, Patrick Angeles [EMAIL PROTECTED] wrote:
 
 
  That was fast :)
 
  Also, while we're on it, I just noticed that the NavigationToolbar
 text
  is
  off. For a list of 50 items with a pagesize of 5, it says: Showing 1
 to
  6
  of 50 (should say Showing 1 to 5 of 50).
 
 
 
  --
  View this message in context:
 
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320251
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12320800
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/AjaxFallbackDefaultDataTable...-changing-sort-does-not-setCurrentPage-to-0-tf4325258.html#a12321602
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]