class Choice{
  private int id; 
  private Stringvalue;

  // getters and setters
}

List<Choice> choices = new LinkedList<Choice>();
Choice c = new Choice();
c.setId( 1 );
c.setValue( "abc" );

choices.add( c );

// add the other values


// The choice with id 1 will be selected.
DropDownChoice drop = new DropDownChoice( "drop" , new Model( c ) , choices,
new ChoiceRenderer( "value" , "id" ) );

-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-with-ID-and-Value-tp24686742p24686931.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to