I'm working on a user profile and need to be able to pre-populate the fields
of the form with the current user profile but I can't get the palette fields
to work.
This is my palette creation method if I use the first paletteModel (the one
that is commented out now) I will get the first item in the available list
shows in the selected box and nothing shows in the other one. If I use the
second paletteModel the avail list all populates correctly in the available
column but when I select some instead of i =
sourcePalette.getSelectedChoices(); returning the correct values (say they
were A, B, C) it will return the first value for each (A, A, A)
public Palette<String> createPalette(List<String> avail, List<String>
selected, String id) {
//Model paletteModel = new Model((Serializable) selected);
Model paletteModel = new Model(new ArrayList());
Model choiceModel = new Model((Serializable)avail);
System.out.println("Available = " + avail.toString());
System.out.println("Selected = " + selected.toString());
Palette<String> palette = new Palette<String>(id, paletteModel,
choiceModel,
new ChoiceRenderer<String>(), 10, false);
return palette;
}
How can I fix this so the available and selected lists both populate
correctly?
--
View this message in context:
http://www.nabble.com/Prepopulating-palette-tp18656359p18656359.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]