why would you change the pojos?
what do they look like now?
They have a name i take?

frank bengtsson wrote:
Problem is, i cant change the pojo's. So i think it will be simpler to get the 
selection value(String) and manually convert to an int and then set it on my 
pojo

agree ?

/Frank

On Tuesday 12 July 2005 22:37, Johan Compagner wrote:
  
with Wicket 1.0 you have to create 2 Choice object for the IChoiceList
imlementation.

In wicket 1.1 (the current cvs)  you could do this:

new DropDownChoice("gender",new Model(),new
ChoiceRenderer("name","id"),list);

and in that list you have 2 pojo's that have a getId() and a getName()

johan

frank bengtsson wrote:
    
Hi there,

I have "Male" + "Female" in my dropdownchoice and they are represented as
int's in my pojo's. How do i get "Male" converted to an int with value 1 ?

Is there a way to set a number for each list item instead of returning the
list item("Male") ?

Or do i have to make a model for that dropdown, which then returns and int
for the get method and takes a string for the set method ?

/Frank
      
-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar
happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest
in dual core and dual graphics technology at this free one hour event
hosted by HP, AMD, and NVIDIA.  To register visit
http://www.hp.com/go/dualwebinar
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
    

  

Reply via email to