I have a CheckGroup inside of a WizardStep panel. In the constructor I am
giving it a PropertyModel like this:

final CheckGroup group = new CheckGroup("group", new
PropertyModel(RegistrationWizard.this, "contacts"));

My wizard class has a setContacts and a getContacts that take a Set and
return a Set respectively. I add a ListView to this group:

                        Form form = new Form("form");
                        group.add(new CheckGroupSelector("groupselector"));
                        ListView contacts = new ListView("contacts", 
contactsModel)
                        {
                                private static final long serialVersionUID = 1L;

                                @Override
                                protected void populateItem(ListItem item)
                                {
                                        Contact contact = 
(Contact)item.getModelObject();
                                        Check contactCheckBox = new 
Check("contactCheckBox", item.getModel());
                                        
                                        Model titleModel = null;
                                        if(contact.getName() == null || 
contact.getName().trim().length() == 0)
                                        {
                                                titleModel = new 
Model(contact.getEmailAddress());
                                        }
                                        else
                                        {
                                                titleModel = new 
Model(contact.getName());
                                        }
                                        Label contactTitle = new 
Label("contactTitle", titleModel);
                                        Label contactEmail = new 
Label("contactEmail", new
Model(contact.getEmailAddress()));
                                        item.add(contactCheckBox);
                                        item.add(contactTitle);
                                        item.add(contactEmail);
                                }
                        };


The top checked contact is always the one returned. It never has the full
collection of selections in my contacts Set. I have been beating my head
over this for hours. Could someone please help!!! I am using wicket 1.3.4

Thanks,

Josh
-- 
View this message in context: 
http://www.nabble.com/CheckGroup-model-only-has-one-element-tp20865674p20865674.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]

Reply via email to