MyObject default = xx;
new DropDownChoice("markup-id", new Model(default), new
AbstractReadOnlyModel() {
 getObject() {
    return Collections.emptyList(); // TODO Your options here
  }
}, new IChoiceRenderer() {
   Object getDisplayValue(Object element) {
      return element.toString(); // What you want to display here
   }
  String getIdValue(Object element, int index) {
    return element.toString(); // or what ever is your unique id for each
selected element
  }
}

**
Martin


2009/2/25 SrinivasaRaju Ch <[email protected]>

> Hi,
>
> I am new to wicket . I want to populate key value pairs to dropbox in
> wicket .  I will be getting a list of Object[]  ex:
> List<Object[]> sampleList = new ArraList<Object[]> and then add some item
> to this list.
> now how can i populate this list into wicket dropbox with key as Object[0]
> and value asObject[1].
> If any one worked on this please send me the code..
>
> Regards,
> Srinivasa Raju CH.
>
>
> Get your world in your inbox!
>
> Mail, widgets, documents, spreadsheets, organizer and much more with your
> Sifymail WIYI id!
> Log on to http://www.sify.com
>
> ********** DISCLAIMER **********
> Information contained and transmitted by this E-MAIL is proprietary to Sify
> Limited and is intended for use only by the individual or entity to which it
> is addressed, and may contain information that is privileged, confidential
> or exempt from disclosure under applicable law. If this is a forwarded
> message, the content of this E-MAIL may not have been sent with the
> authority of the Company. If you are not the intended recipient, an agent of
> the intended recipient or a  person responsible for delivering the
> information to the named recipient,  you are notified that any use,
> distribution, transmission, printing, copying or dissemination of this
> information in any way or in any manner is strictly prohibited. If you have
> received this communication in error, please delete this mail & notify us
> immediately at [email protected]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to