[EMAIL PROTECTED] wrote:
| 4095|New|Nor|2001-10-11|html:select should take default value from the pro|
I was planning to write a patch for this, but wanted to check the functionality with you guys first.

The problem is that <html:select> fields don't inherit their default option from the corresponding form property. Unless you hard-code a default value (or use a jsp work-around) the select box defaults to the option at the top of the options list. The solution that fits most easily with existing struts functionality would be:

    if 'property' tag attribute is set and 'value' isn't then set the html 'value' attribute to the current form property value.

In other words, you can still override the current form property with a hard-code default option if you want to.

The problem with this solution is that it is not *quite* backwards compatible: in particular, those pages that currently use a <html:select> without specifying a default value will find the option defaulting to the current property value, rather that the option at the top of the list.

So is the current behaviour a bug that needs eliminating, or a much-loved 'feature' that needs preserving?

--

Joe Faith

Runtime Collective, Ltd
T: (+44) 01273 234294
 

Reply via email to