I'm new to wicket and although I have seen a bunch of examples using both
DropDownChoice and Palette I can not get the selected values from either
list. Currently this is what I'm doing:
this.setModel(new CompoundPropertyModel(profile));
List<PaletteObject> paletteList = new ArrayList<PaletteObject>();
IChoiceRenderer renderer = new ChoiceRenderer("name", "name");
Palette palette = new Palette(disabledAttributes, new Model(new
ArrayList()), new Model((Serializable) paletteList), renderer, 10, false);
DropDownChoice perPageField = new DropDownChoice("perPageRows",
perPageChoices);
AjaxLink close = new AjaxLink("close") {
public void onClick(AjaxRequestTarget target) {
System.out.println(profile.getDisabledAttributes());
System.out.println(profile.getTotalRows());
}
};
add(palette);
add(perPageField);
public class Profile implements Serializable {
public String perPageRows;
public List<String> disabledAttributes;
//getters and setters removed so this isn't huge.
}
I have also tried omitting the compoundPropertyModel and just using normal
PropertyModels on the individual fields but that also didn't work, I have
spent hours on this and haven't gotten anywhere.
Thanks for your help,
Kim
--
View this message in context:
http://www.nabble.com/Getting-selections-from-DropDownChoice-and-Palette-components-tp18617786p18617786.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]