Thanks for your help.
Martin Grigorov-4 wrote
> List
> <IModel>
> ddlmodels = ....
> List
> <String>
> selection = Arrays.asList("A", "B");
> form.add(new ListView("lis", selection) {
>
> @Override
> protected void populateItem(ListItem item) {
> List list;
> if (item.getModelObject().equals("A")) {
> list = Arrays.asList("a1", "a2");
> } else {
> list = Arrays.asList("b1", "b2");
> }
> DropDownChoice ddl = new DropDownChoice("ddltest",
> ddlmodels.get(item.getIndex()), list);
> item.add(ddl);
> }
>
> });
>
>
> On Tue, Nov 20, 2012 at 10:49 AM, david.li <
> lxw_first@
> > wrote:
>
>> you said need a separate ddlmodel for each DropDownChpice.
>> How to implement it in ListView?
>>
>> Can you give me a sample?
>> Thanks.
>>
>>
>> Martin Grigorov-4 wrote
>> > You need a separate ddlmodel for each DDC.
>> > Currently you are passing the same backend to all DDCs and they
>> override
>> > its value.
>> >
>> >
>> > On Tue, Nov 20, 2012 at 10:19 AM, david.li <
>>
>> > lxw_first@
>>
>> > > wrote:
>> >
>> >> Through the ddlmodel.getObject() just get the value of the last
>> >> DropDownChoice,but I want to get the value of the all DropDownChoice.
>> >>
>> >>
>> >>
>> >> -----
>> >> david
>> >> --
>> >> View this message in context:
>> >>
>> http://apache-wicket.1842946.n4.nabble.com/how-to-get-the-listview-s-dropdownchoice-value-tp4654012p4654016.html
>> >> Sent from the Users forum mailing list archive at Nabble.com.
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail:
>>
>> > [email protected]
>>
>> >> For additional commands, e-mail:
>>
>> > [email protected]
>>
>> >>
>> >>
>> >
>> >
>> > --
>> > Martin Grigorov
>> > jWeekend
>> > Training, Consulting, Development
>> > http://jWeekend.com <http://jweekend.com/>
>>
>>
>>
>>
>>
>> -----
>> david
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/how-to-get-the-listview-s-dropdownchoice-value-tp4654012p4654020.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
> [email protected]
>> For additional commands, e-mail:
> [email protected]
>>
>>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
-----
david
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/how-to-get-the-listview-s-dropdownchoice-value-tp4654012p4654056.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]