Hi everyone, I'm new to wicket and have a simple question: I want to display a dropdown choice but I don't want to bind the entire list of objects in it. Is there a simple way to bind a key-value pair and get into a property the selected Id and not the selected object (like .Net dropdown)?
The solution that I'm using is implement an object called Option that it's basically a key - value pair. //properties Option selectedUser //DropDownChoice binding List<Option> users = new ArrayList<Option>() for(User user in UserDao.getUsers()) users.add(new Option(user.getId(), user.getName())); DropDownChoice choice=new DropDownChoice("ddc", new PropertyModel(this, "selectedUser"), users); Is there a simpler way to do this? maybe I don't understand the whole idea of wicket very well, but I really don't want to put big objects in the model to display only a key - value pair. Thanks in advance Beto ------------------------------------------------------------------------- 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 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users