RE: [Wicket-user] lists

2005-07-31 Thread Igor Vaynberg
Which rfe? -Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Phil Kulak Sent: Saturday, July 30, 2005 10:50 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists I just found the code you attached to the rfe. I

Re: [Wicket-user] lists

2005-07-31 Thread Phil Kulak
Oh sorry, I meant the code that you attached to this topic about 20 or so up. On 7/30/05, Igor Vaynberg [EMAIL PROTECTED] wrote: Which rfe? -Igor --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find

Re: [Wicket-user] lists

2005-07-31 Thread Johan Compagner
@lists.sourceforge.net Subject: Re: [Wicket-user] lists Okay, I see what you're saying. I think it would be cool to have it work like this: run through the Iterator from the DataSource and, using pks, determine if the current list exactly matches the one from the last request. If so, do nothing. Otherwise, re

Re: [Wicket-user] lists

2005-07-31 Thread Johan Compagner
test. Looking forward to some feedback. -Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner Sent: Sunday, July 31, 2005 6:25 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists please post a mail when you

Re: [Wicket-user] lists

2005-07-30 Thread Phil Kulak
I was thinking of having iterator(int first, int count, DataView dataView) which would eliminate the requirement for keeping state in the dataprovider and still let you work directly off the interface. Are you looking to have these DataProviders be singletons? That could make your

RE: [Wicket-user] lists

2005-07-30 Thread Igor Vaynberg
I was thinking of having iterator(int first, int count, DataView dataView) which would eliminate the requirement for keeping state in the dataprovider and still let you work directly off the interface. Are you looking to have these DataProviders be singletons? That could make your

RE: [Wicket-user] lists

2005-07-30 Thread Igor Vaynberg
I am writing the code. I will commit it hopefully tomorrow. -Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Phil Kulak Sent: Saturday, July 30, 2005 10:11 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists Okay

Re: [Wicket-user] lists

2005-07-30 Thread Phil Kulak
I just found the code you attached to the rfe. I really like that. The amount of complexity it removes it ridiculous. I'll definitely give it a try as soon as it's committed. On 7/30/05, Igor Vaynberg [EMAIL PROTECTED] wrote: I am writing the code. I will commit it hopefully tomorrow. -Igor

Re: [Wicket-user] lists

2005-07-29 Thread Eelco Hillenius
As far as I'm concerned they can go. I've never used them myself, and see no very common usecase in them. If you want them remove, pls open up a bug report and/ or start a vote on the dev list. Eelco I was thinking about the moveUp and moveDown links. I do not need them often and if I need

Re: [Wicket-user] lists

2005-07-29 Thread Christian Essl
interface IteratorProvider{ int size(); Iterator iterator(int start, int minCount); IModel model(Object o); == do you like that? } Shall we rename dataview to iteratorview? I was thinking about the name again. (Good names are very important for new users and for

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
@lists.sourceforge.net Subject: Re: [Wicket-user] lists interface IteratorProvider{ int size(); Iterator iterator(int start, int minCount); IModel model(Object o); == do you like that? } Shall we rename dataview to iteratorview? I was thinking about the name

Re: [Wicket-user] lists

2005-07-29 Thread Christian Essl
. -Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Essl Sent: Friday, July 29, 2005 9:41 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists interface IteratorProvider{ int size(); Iterator iterator(int

Re: [Wicket-user] lists

2005-07-29 Thread Erik van Oosten
I am not even sure the following interface will be used at all, but maybe I can contribute in a small way with my small comment on the names. interface IteratorProvider{ int size(); Iterator iterator(int start, int minCount); } This very similar to the Java 5 Iterable interface. What

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
@lists.sourceforge.net Subject: Re: [Wicket-user] lists I am not even sure the following interface will be used at all, but maybe I can contribute in a small way with my small comment on the names. interface IteratorProvider{ int size(); Iterator iterator(int start, int minCount

Re: [Wicket-user] lists

2005-07-29 Thread Phil Kulak
It's just as easy to build paging into a List as it is into the component itself. However, the way it is currently, my DAO can return a paging list and set up exactly how said List gets it's data each time it pages; exactly what a DAO is supposed to do. Unfortunately the only object

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
to reconstruct a list from an iterator } } -Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Phil Kulak Sent: Friday, July 29, 2005 1:55 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists It's just

Re: [Wicket-user] lists

2005-07-29 Thread Phil Kulak
On 7/29/05, Igor Vaynberg [EMAIL PROTECTED] wrote: Once again, this has become a philosophical discussion. I say tomato you say tomato. This is going to live as a contrib package so it wont distrub anything, people who prefer this style will use it. Besides you can do final List

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists On 7/29/05, Christian Essl [EMAIL PROTECTED] wrote: Igor needs an eight-liner where you need a helper-class which is complicated enough to put in an extra contribution-package. OrderedPageList adds some indirection to get

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
Yea, I can see how that would work. You're just saying to put the black box in the ListView, right? There is no black box. The paging that the pagedlist does is no longer necessary. Your DataProvider interface is a bit too simple (doesn't allow ordering, and EJB and Hibernate2 can't wrap

RE: [Wicket-user] lists

2005-07-29 Thread Igor Vaynberg
No, the query cache only caches the primary keys... This sounds exactly like iterate() but you have to remember to call setCachable(true). One thing I would add though, would be a setPageableListView() method. If the DataProvider knows about its container, it can do cleanup things when it's

Re: [Wicket-user] lists

2005-07-28 Thread Christian Essl
Hi Igor, If I understand you correctly you would like to provide the min amount of entries and have the iterator access more if they are needed? If so, this is one of the things I was trying to eliminate. Currently dataview asks your dataprovider for the exact segment of data it needs and so

RE: [Wicket-user] lists

2005-07-28 Thread Igor Vaynberg
I'm not sure if this is still a debate. but I really like keeping ListView and PageableListView's model plain old lists. We are not changing the framework, we are working on additional components. I like the dataprovider interface because it is much more low level then the general list

RE: [Wicket-user] lists

2005-07-28 Thread Igor Vaynberg
I actually meant that the iterator must at least return the minCount of values - it does not matter if it returns more or not. So it could load only the elements up to minCount or in case it is backed by a list it could return list.listIterator(index). The DataView just does not care

Re: [Wicket-user] lists

2005-07-28 Thread Christian Essl
On Thu, 28 Jul 2005 07:51:36 -0700, Igor Vaynberg [EMAIL PROTECTED] wrote: I would say in you DataView: protected ListItem newItem(final int index, final Object object) { return new ListItem(index, getDataProvider().getObjectModel(object)); } protected IModel getListItemModel(Object

Re: [Wicket-user] lists

2005-07-27 Thread Christian Essl
Hi, I am quite a new Wicket user and have to agree with Igor. I found ListView always a bit 'magical' confusing. I do not realy understand wheter I've to keep my list (indexed) stable between calls and in case of DB backed lists how to do that. If I want to provide a custom model which

RE: [Wicket-user] lists

2005-07-27 Thread Igor Vaynberg
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Essl Sent: Wednesday, July 27, 2005 1:06 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] lists Hi, I am quite a new Wicket user and have to agree with Igor. I found

Re: [Wicket-user] lists

2005-07-27 Thread Eelco Hillenius
these work with navigation classes that currently only support listviews. Igor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Essl Sent: Wednesday, July 27, 2005 1:06 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user

RE: [Wicket-user] lists

2005-07-27 Thread Igor Vaynberg
: [Wicket-user] lists Could you attach those to the rfe please? Thanks, Eelco Igor Vaynberg wrote: Hi Christian, Attached are my proof-of-concept classes ive been playing around with. Basically this is the interface and cannibilized versions of listview and pageablelistview

RE: [Wicket-user] lists

2005-07-27 Thread Igor Vaynberg
Why not have public interface DataProvider extends Serializable { Iterator getElements(int first, int minCount); int getCount(); } I was definetely thinking of doing that, didn't get to it yet. A list was simply the most convinient because that's what EntityManager returns

Re: [Wicket-user] lists

2005-07-27 Thread Phil Kulak
I'm not sure if this is still a debate. but I really like keeping ListView and PageableListView's model plain old lists. It's just as easy to build paging into a List as it is into the component itself. However, the way it is currently, my DAO can return a paging list and set up exactly how said

Re: [Wicket-user] lists

2005-07-26 Thread Erik van Oosten
Having 2 versions, one for 1.5 and one for = 1.5, is I guess out of the question as well? (like commons-collections) It would be great to at least javadoc stuff as if it were developed for 1.5. Erik. As a framework we can't do that yet i am afraid. i think even 1.2 will be to soon. As

Re: [Wicket-user] lists

2005-07-25 Thread Johan Compagner
As opposed to IModel getListItemModel(final IModel listViewModel, final int index) ? What exactly does index mean in a context of a database backed list? What kind of a model does listViewModel represent? Ok didn't know you would use that method to get a listitem model. But this you

Re: [Wicket-user] lists

2005-07-25 Thread Eelco Hillenius
You are right I can do that no problem. What I was trying to achieve in all these discussions is to create a simpler/standard/non-list-dependent/more user-aware way to do this because I thought other people would have the same problem and thus would need a similar solution. However, since no

Re: [Wicket-user] lists

2005-07-24 Thread Johan Compagner
2) in order to use primary keys we need to translate an object into a pk-based model. Currently this is done by overriding a method in a listview, however, this is a horizontal concern and should be separated. I don't want those methods in the model. That is a -1 from me. I like the current

Re: [Wicket-user] lists

2005-07-24 Thread Phil Kulak
I think that ListView should stay how it is, and PageableListView should have a method like IModel getObjectModel(Object o). Maybe even make it abstract. I use ListView all over the place for displaying a list of items that may or may not have come from a database. However, PageableListView really

Re: Re: [Wicket-user] lists

2005-07-24 Thread Igor Vaynberg
I think that ListView should stay how it is, and PageableListView should have a method like IModel getObjectModel(Object o). Maybe even make it abstract. I use ListView all over the place for displaying a list of items that may or may not have come from a database. However, PageableListView

Re: [Wicket-user] lists

2005-07-24 Thread Igor Vaynberg
Once again, we shouldn't limit our discussion to hibernate. Is wicket gearing to only support hibernate? What if I am using jdbc? As far as hibernate goes, the answer to your question is yes and no. You can mark objects as lazy and that will put them behind a proxy which will load the data at

Re: [Wicket-user] lists

2005-07-24 Thread Eelco Hillenius
Igor Vaynberg wrote: Once again, we shouldn't limit our discussion to hibernate. Is wicket gearing to only support hibernate? What if I am using jdbc? Nope, we want to support nothing in partcular/ everything possible. Eelco --- SF.Net

Re: [Wicket-user] lists

2005-07-24 Thread Johan Compagner
listview or pageablelistview are both not limited to anything. They can do both just fine. Igor Vaynberg wrote: I think that ListView should stay how it is, and PageableListView should have a method like IModel getObjectModel(Object o). Maybe even make it abstract. I use ListView all over the

[Wicket-user] lists

2005-07-23 Thread Jonathan Locke
we've had this conversation at least a couple of times. while it's possible that wicket listviews could have a better model object somehow (and then provide an adaptor for existing list-based code), we should be careful not to go crazy with features we don't really need. less is always more.

Re: [Wicket-user] lists

2005-07-23 Thread Jonathan Locke
database driven webapps may use primary key, but wicket needs to be general enough to display lists that are simply any ordered collection. the current code works, so we need to consider all aspects of lists and listviews to make changes. we really shouldn't restrict a general class like