Re: PagingNavigator faster paging

2008-05-16 Thread lars vonk
Ì am not sure about Pagenavigator (is this an existing Wicket class? I can't
find it).

We have implemented what you describe using DataView and by implementing the
IDataProvider to do the call to Hibernate with the given first and count
passed in the method *Iterator iterator(int first, int count);* you need to
implement.

Hope this helps,

Lars

On Fri, May 16, 2008 at 1:47 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Hi!

 I'm using a Pageable List view to list my items. The problem is that it is
 to slow when there are many items

 In the database I have 2000 items and when I hit all of them the rendering
 is slow. This is because of translating, calculating and so on. To solve
 this I would like to do something like

 // Hibernate

 getTotalCount
 Build Pagenavigator from totalcount. Only fetch the exact amount of item
 using setMax, setFirst with hibernate.

 Is it possible to use the Pagenavigator  using this?

 --
 View this message in context:
 http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17272873.html
 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: PagingNavigator faster paging

2008-05-16 Thread Martijn Dashorst
Don't use the PageableListView, but use DataView with an IDataProvider.

Martijn

On 5/16/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

  Hi!

  I'm using a Pageable List view to list my items. The problem is that it is
  to slow when there are many items

  In the database I have 2000 items and when I hit all of them the rendering
  is slow. This is because of translating, calculating and so on. To solve
  this I would like to do something like

  // Hibernate

  getTotalCount
  Build Pagenavigator from totalcount. Only fetch the exact amount of item
  using setMax, setFirst with hibernate.

  Is it possible to use the Pagenavigator  using this?


  --
  View this message in context: 
 http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17272873.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

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



Re: PagingNavigator faster paging

2008-05-16 Thread Mathias P.W Nilsson

Thanks!

I used this but I don't think it is any faster

class ItemProvider implements IDataProvider{
private static final long serialVersionUID = 1L;

public Iterator iterator(int first, int count) {
  return getItemDao().getItems(getFilters(), first, count
).iterator();
}

public int size() {
return getItemDao().getItemCount( getFilters());
}

public IModel model(Object object) {
  return new Model((Item) object); 
}

public void detach() {
// TODO Auto-generated method stub

}
 }
-- 
View this message in context: 
http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17274697.html
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: PagingNavigator faster paging

2008-05-16 Thread Meindert Deen
You can use PagingNavigation to page trough everything in the DB:
http://www.wicketstuff.org/wicket13/repeater/;jsessionid=1A8942B5B6C08E39348C4E8923DB32CB?wicket:bookmarkablePage=%3Aorg.apache.wicket.examples.repeater.PagingPage

That way you don't get everything from the database all the time.

Grtz,

M

On Fri, May 16, 2008 at 3:27 PM, Mathias P.W Nilsson [EMAIL PROTECTED]
wrote:


 Thanks!

 I used this but I don't think it is any faster

 class ItemProvider implements IDataProvider{
private static final long serialVersionUID = 1L;

public Iterator iterator(int first, int count) {
  return getItemDao().getItems(getFilters(), first, count
 ).iterator();
}

public int size() {
return getItemDao().getItemCount( getFilters());
}

public IModel model(Object object) {
  return new Model((Item) object);
}

public void detach() {
// TODO Auto-generated method stub

}
 }
 --
 View this message in context:
 http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17274697.html
 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: PagingNavigator faster paging

2008-05-16 Thread Mathias P.W Nilsson

Yes, I use the page navigator. 
-- 
View this message in context: 
http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17274891.html
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: PagingNavigator faster paging

2008-05-16 Thread Mathias P.W Nilsson

I was unclear with the class.

I use PagingNavigation with my dataProvider but it's still to slow. Must be
something else.

-- 
View this message in context: 
http://www.nabble.com/PagingNavigator-faster-paging-tp17272873p17274937.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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