I've been experiencing a problem with the Palette component. User 
choices are always returned as n times the first item from options, 
unless the ChoiceRenderer is explicitely constructed with an idExpression.
For example the following code:

//class Input implements Serializable, it has two members: private int 
id;  private String display;
ArrayList<Input> inputList = new ArrayList<Input>();      
inputList.add(new Input(1, "een"));
inputList.add(new Input(2, "twee"));
IChoiceRenderer renderer = new ChoiceRenderer("display");
Palette choose =
    new Palette("id", new Model(new ArrayList<String>()), new 
Model(inputList), renderer,20, false);

Produces the following output when combined with echoing user choices 
(choose.getUnselectedChoices() and choose.getSelectedChoices()) :

*user selection***selected***unselected*
*                       *                 *  een, twee *
*een                 *  een          *                  *
*twee               * een           *                  *
*een, twee       * een, een    *                  *
****************************************

Meaning that indexing by index does not work with palette?




-- 
Ivana Cace
Func. Internet Integration
W http://www.func.nl
T +31 20 4230000
F +31 20 4223500


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to