Hi Bas, is your edited activity.location.address.country equal to 4122? If so it will be selected, if not than it won't be.
Best greetings, Paweł Wielgus. 2009/5/26 Bas Schulte <ba...@connectedcreations.nl>: > Hi, > > I'm pretty much stumped about this one. I have a list of countries > (List<Country>) that I return from my action to the view .jsp. > > I can render the select list just fine, this is the outputted html: > > <select name="activity.location.address.country" > id="update-activity-location_activity_location_address_country"> > <option value="4121">Nederland</option> > <option value="4122">United Kingdom</option> > <option value="4123">Deutschland</option> > </select> > > However, for the life of it I can't figure out how to have the country that > is associated with the current entity I'm editing (Activity) selected, like > this: > > ... > <option value="4122" selected>United Kingdom</option> > ... > > This is in my jsp: > > <s:select name="activity.location.address.country" > value="%{activity.location.address.country}" > list="countries" > listKey="id" > listValue="displayLabel"></s:select> > > With this, the list populates correctly, except for the ' selected' option > on the current country that is associated with the activity. > > The answer no doubt lies in the 'value' attribute, I've tried this as well: > > value="%{activity.location.address.country.id}" > > Didn't work either. > > Can anyone point me in the right direction? > > Thanks, > > bas. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org