On 9/16/07, chickabee <[EMAIL PROTECTED]> wrote: > > Hi, > > I am looking for an equivalent to: > DropDownChoice.setSelected(Object object) > > I looked into API docs but can't figure it out. I have drop down with 18 > different choices and I want to select one from either on the available > values based on a PageParameter received.
You should try to turn this around and let your models pull the proper values rather then doing it 'manually'. Look for instance at DropDownChoicePage from package org.apache.wicket.examples.compref (wicket-examples). To set the current selection there, you could just do input.site = "The Server Side". The dropdownchoice's model will pick up that value at it's current model value (dropdownchoice doesn't have an explicit model, so it will resolve to use the parent's compound property model, which works on the input object, with it's id - site - as the property expression) and match this value against the available selections (the sites array). Makes sense? Eelco --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
