dont quote me on this

in MyPage.html
<wicket:fragment id="addresses-frag"><select wicket:id="dropdown"></select></wicket:fragment>

class MyPage {

class AddressColumn extends AbstractColumn {

void populateItem(final Item cellItem, final String componentId, final IModel rowModel) {
  Fragment frag=new Fragment(componentId, "addresses-frag", Mypage.this);
  item.add(frag);

  frag.add (new DropDownChoice("dropdown", new PropertyModel(rowModel, "addresses", new IChoiceRenderer() {
  String getId(Obect o, int idx) { return idx}
String getDisplayValue(Object o) { return ((Address)o).getStreet(); }});


}

}

-Igor


On 9/26/06, Jaime De La Jara <[EMAIL PROTECTED]> wrote:
Hi, playing with the phonebook example app I added a collection field to Contact class, this field is a collection of instances of class Address which has two String fields : city and street. I'd like to display a drop down choice containing the street property for each address instance that a contact has, How could I achieve this?

Thanks,

Jaime.


Get your own web address for just $1.99/1st yr. We'll help. Yahoo! Small Business.


-------------------------------------------------------------------------
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



-------------------------------------------------------------------------
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