The select tag does not correctly match values from a
mapped field.  Thus, the following does not work:

html:select property="value(cars)" value="value(cars)"

This would theoretically get the mapped value for the
key "cars" from our form bean and match against an
item in our list of options.  However, it does not,
because inside the SelectTag.java code, we are in fact
only looking at the string "value(cars)" rather than
the underlying string it represents, which could be
"Ford", "Chevy", etc.

This IMHO is a bug :)  

But this leads to a more fundamental question.  Why is
there a need to set property *and* value attributes? 
Most other tag will get/set the "property" with the
value selected in the user's form or the bean. 
However, what Im seeing is that the select tag is
different.  The value attribute can be used as a
"default selected item" value, but the existing value
of the property is currently ignored.

A more reasonable behavior is to have the existing
value of the property attribute evaluated, and matched
against the list of options.  Those that match, are
"selected".  If none are matched, the "value"
attribute can be evaluated.  I know this complicates
the code, but the current behavior is a tad astray
from what one might expect.

Regards,
Mark Williamson


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to