You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by dm...@pncbank.com on 2003/03/21 20:57:19 UTC

Not getting selected option

Hello,

I have read through a number of documents (a couple books, tag-lib docs,
and anything I could find in a google search) and have been unable to find
an answer.  My circumstance is that I'm running Struts 1.1 rc1, JVM 1.4.1,
WebLogic 7.0, and Windows 2000.

All of the documentation I read claims that if I do the following in a jsp:

<html:select property="foo.bar.type">
            <html:option value="type1">Choice for type 1</html:option>
            <html:option value="type2">Choice for type 2</html:option>
            <html:option value="type3">Choice for type 3</html:option>
</html:select>

(and the formbean specified in the action contains the variable "foo" which
contains "bar" which contains "type" and all of the associated getters and
setters)
that if I initialize "type" to "type3", then when the page is rendered,
"type3" should be selected.  I am not finding this to be the case, and was
wondering if anyone had any ideas about how I could get this to work as
expected.

I have tried adding value="foo.bar.type" to the select statement, but
Struts does not evaluate a value like it does a property.  I have also
tried <html:option value="type1"/> and removing the closing tag on the end.

Any help would be greatly appreciated.  Thanks!

Derek



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org