On 1/27/06, David Leangen <[EMAIL PROTECTED]> wrote:
it performs a lookup for the page that it is displaying. IDataProvider.iterator(first, count). first is the offset of the first entry in the page, and count is how many entries should be retrieved. its all in the javadoc for the IDataProvider.
the IDataProvider/DataView were designed so you dont have to retrieve more then you will display since its expensive.
you need to use CheckGroup/Check components. see the explanation on the RadioGroup/Radio in the thread i gave you a link to previously. CheckGroup/Check work exactly the same way, the only difference is that CheckGroup's model object should be a collection.
-Igor
Sorry for so many question in one day. :-(
Ok, all is well with the ListView. I am looking into a few other things
now.
First, DataProvider/DataView as you suggested, and that looks very
interesting. The problem is--unless I am totally misunderstanding the
idea--that it seems that this approach does a lookup in the DB for each
item in the list. Is that so? If so, since there is so much overhead for
each lookup, this would be much to inefficient.
it performs a lookup for the page that it is displaying. IDataProvider.iterator(first, count). first is the offset of the first entry in the page, and count is how many entries should be retrieved. its all in the javadoc for the IDataProvider.
I could look up, say, up to 100 items or so, keep them in a cache, then
use the DataProvider/DataView on that. I guess this would be like paging
in paging. Does this sound like the right approach? How would you go
about implementing this?
the IDataProvider/DataView were designed so you dont have to retrieve more then you will display since its expensive.
Second, for each item in the list, I need to attach a checkbox. An item
can be in a (non)selected state, which can have consequences if other
form actions are taken.
The form examples show the use of a CheckBox for a single item, but how
do I apply this to each item the same list that I'm trying to display?
you need to use CheckGroup/Check components. see the explanation on the RadioGroup/Radio in the thread i gave you a link to previously. CheckGroup/Check work exactly the same way, the only difference is that CheckGroup's model object should be a collection.
-Igor
