yes:

List options = Arrays.asList("a", "b", "c");
add(new ListMultipleChoice("select", new
Model((Serializable)Arrays.asList("b")), options));


On Mon, Oct 26, 2009 at 11:06 AM, Peter Arnulf Lustig <[email protected]>wrote:

> and in the html it is also showed as "selected" ?
>
>
>
> ----- Ursprüngliche Mail ----
> Von: Pieter Degraeuwe <[email protected]>
> An: [email protected]
> Gesendet: Montag, den 26. Oktober 2009, 13:59:36 Uhr
> Betreff: Re: ListMultipleChoice - Pre fill out
>
> just make sure that the model, which contains the 'selected' items, does
> already contain the selected items.
>
> Your model probably maps to an object property. (in this case, the property
> is a collection(List/set) . So, add te 'pre-selection' to the collection,
> and the ListMultipleChoice will follow..
>
> On Mon, Oct 26, 2009 at 1:53 PM, Peter Arnulf Lustig <[email protected]
> >wrote:
>
> > Hi,
> >
> > how can I "pre-select" some List-Items, when showing the form with the
> > ListMultipleChoice?
> >
> > Thank you for some advice!
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> Pieter Degraeuwe
> Systemworks bvba
> Belgiëlaan 61
> 9070 Destelbergen
> GSM: +32 (0)485/68.60.85
> Email: [email protected]
> visit us at http://www.systemworks.be
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Pedro Henrique Oliveira dos Santos

Reply via email to