Re: [Wicket-user] CheckBox and GridView

2006-11-14 Thread Igor Vaynberg
well like i said, the gridview was working fine :)https://issues.apache.org/jira/browse/WICKET-64-igor On 11/13/06, Ingram Chen [EMAIL PROTECTED] wrote: ok, I change to: ListDataProvider listDataProvider = new ListDataProvider(dataList) { @Override public IModel model(Object object) {

Re: [Wicket-user] CheckBox and GridView

2006-11-13 Thread Igor Vaynberg
the rowitems do not matter, they hold no state. it is the cell items (individual squares in the grid) whose component hierarchy must be preserved, and it looks to me like it is because those are managed by the dataview. are you sure you overrode equals and hashcode on the IModel not on the model

Re: [Wicket-user] CheckBox and GridView

2006-11-13 Thread Ingram Chen
I try to write a model which equals if beckendObject equals: private final class BackendEqualsThenModelEqualsModel extends Model { private BackendEqualsThenModelEqualsModel(Serializable object) { super(object); } @Override public boolean equals(Object obj) { return

Re: [Wicket-user] CheckBox and GridView

2006-11-13 Thread Igor Vaynberg
why are you overriding newItem ? the idataprovider implementation must return the correct model in its model(Object) method-igorOn 11/13/06, Ingram Chen [EMAIL PROTECTED] wrote:I try to write a model which equals if beckendObject equals: private final class BackendEqualsThenModelEqualsModel

Re: [Wicket-user] CheckBox and GridView

2006-11-13 Thread Ingram Chen
ok, I change to: ListDataProvider listDataProvider = new ListDataProvider(dataList) { @Override public IModel model(Object object) {return new BackendEqualsThenModelEqualsModel( (Serializable) object); } }; checkGroup.add(new GridView(checks, listDataProvider) { @Override

Re: [Wicket-user] CheckBox and GridView

2006-11-12 Thread Ingram Chen
This reminds me bad experiences with check + gridview sometime ago.GridView does not support Item reuse. i.e. If any form validation error occur,user input are just disappeared. use with care! On 11/9/06, Frank Bille [EMAIL PROTECTED] wrote: On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote

Re: [Wicket-user] CheckBox and GridView

2006-11-12 Thread Igor Vaynberg
thats not true, see GridView.setItemReuseStrategy, IItemReuseStrategy, and ReuseIfModelsEqualStrategy-igorOn 11/12/06, Ingram Chen [EMAIL PROTECTED] wrote:This reminds me bad experiences with check + gridview sometime ago. GridView does not support Item reuse. i.e. If any form validation error

Re: [Wicket-user] CheckBox and GridView

2006-11-12 Thread Ingram Chen
Yes, I do try ReuseIfModelsEqualStrategybut... it does not work for me. I dig into source code and found GridView internally use another RepeatingView for rows, and it doesn't utilize IItemReuseStrategy. Maybe I just do wrong configuration...On 11/13/06, Igor Vaynberg [EMAIL PROTECTED] wrote:

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Frank Bille
I have never used GridView myself, but how about putting a CheckGroup around the GridView and then add a Check in the ICellPopulator? Something like this:public class PojoForTellingWhichChecksHasBeenClicked { private Set selectedChecks; // Getters and

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Igor Vaynberg
are you sure you would not rather use CheckGroup and Check? might be much easier.-igorOn 11/8/06, Flemming Seerup [EMAIL PROTECTED] wrote:How do I use CheckBox in a GridView component, and find the seleted in the onSubmit method

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
CheckGroup sounds right ... but I'm not sure where ICellPopulator should be used. And I keep getting Invalid boolean value MasterReference. somehow I missing a method to tell wicket if the checkbox should be checked, right? My code is currently:

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Frank Bille
I looked at DataGridView. Please take a look at that to see if it is what you need (that has ICellPopulator).FrankOn 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote:CheckGroup sounds right ...but I'm not sure where ICellPopulator should be used.And I keep getting Invalid boolean value

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
DataGridView is not related to GridView, but as more like a plain table. I need the features of GridView :-/ Quoting Frank Bille [EMAIL PROTECTED]: I looked at DataGridView. Please take a look at that to see if it is what you need (that has ICellPopulator). Frank On 11/9/06, Flemming

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Frank Bille
On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote public ThumbnailImageFragment(String id, final ImageReferencereference, IModelitemModel) {super(id);CheckBox checkBox = new CheckBox(select, itemModel);add(checkBox); Try to use Check instead of CheckBox. I think that is your problem

Re: [Wicket-user] CheckBox and GridView

2006-11-09 Thread Flemming Seerup
YES, that worked... what a stupid mistake! ;-) Quoting Frank Bille [EMAIL PROTECTED]: On 11/9/06, Flemming Seerup [EMAIL PROTECTED] wrote public ThumbnailImageFragment(String id, final ImageReference reference, IModel itemModel) { super(id); CheckBox checkBox = new