RE: html:options won't get preselected!
You are right! It was the key against the name. Thank you so much. Nadia -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, December 30, 2004 11:20 AM To: Struts Users Mailing List Subject: Re: html:options won't get preselected! From: "Nadia Kunkov" <[EMAIL PROTECTED]> > > > Struts will pre-select the item when the 'country' property of the form matches the countryID of the option. What is the exact value of the 'country' property of the form? I'm betting you've got 'Canada' when you need 'CAN'. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:options won't get preselected!
From: "Nadia Kunkov" <[EMAIL PROTECTED]> > > > Struts will pre-select the item when the 'country' property of the form matches the countryID of the option. What is the exact value of the 'country' property of the form? I'm betting you've got 'Canada' when you need 'CAN'. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:options won't get preselected!
Hi, I have a form that my action prepopulates and that works fine. For example: Country is FormBean property that is populated from the database by my action. This is all good but I want the user to be able to change the country so I need a dropdown list. Here is what I have: CountryList is a bean in request scope. The above gives me a drop down list with all the countries in the database but I need one country to be preselected. I already have the right value in the form which I can get using . As far as I understand if the value in the formbean equals the value in the dropdown list this value will be preselected. This does not happen for me. My dropdown list has random order. What am I doing wrong? Thanks for your help. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]