You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John C Cartwright <Jo...@noaa.gov> on 2003/02/17 17:44:08 UTC
tag and the value attribute
Hello All,
I'm having some trouble getting the <html:select> tag to recognize the
"value" attribute in order to set the appropriate enclosed option to
selected. It works fine with a simple string, but doesn't seem to
recognize a RT expression.
Here's the code sample:
<html:select
property="mapservicename"
value="${mapserviceDetailForm.mapservice.name}">
<html:optionsCollection
label="name"
property="mapserviceList"
value="name" />
</html:select>
There is a bean "mapservice" contained in mapserviceDetailForm, and it
has a property "name" that should identify the option to be selected.
Can anyone point out what I'm doing wrong?
Thanks!
-- john
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: tag and the value attribute
Posted by John C Cartwright <Jo...@noaa.gov>.
Very cool! -- thanks very much for your help and for contributing
Struts-EL!
-- john
David M. Karr wrote:
>>>>>>"John" == John C Cartwright <John> writes:
>>>>>>
>>>>>>
>
> John> Thanks for the prompt reply, David. I didn't realize that there was a
> John> Struts-EL library, where would I find such a beast? I don't see mention of it
> John> in the 1.1b3 distribution nor in the on-line docs.
>
>It's in a directory in the "contrib" directory, in the main distribution.
>There is a small section on it in the user guide. You could search the mail
>archives for more discussion about it. The following link is for the original
>announcement about it on "struts-user":
>
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: tag and the value attribute
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "John" == John C Cartwright <John> writes:
John> Thanks for the prompt reply, David. I didn't realize that there was a
John> Struts-EL library, where would I find such a beast? I don't see mention of it
John> in the 1.1b3 distribution nor in the on-line docs.
It's in a directory in the "contrib" directory, in the main distribution.
There is a small section on it in the user guide. You could search the mail
archives for more discussion about it. The following link is for the original
announcement about it on "struts-user":
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg43743.html
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net ; SCJP; SCWCD
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: tag and the value attribute
Posted by John C Cartwright <Jo...@noaa.gov>.
Thanks for the prompt reply, David. I didn't realize that there was a
Struts-EL library, where would I find such a beast? I don't see mention
of it in the 1.1b3 distribution nor in the on-line docs.
Thanks again!
-- john
David M. Karr wrote:
>>>>>>"John" == John C Cartwright <John> writes:
>>>>>>
>>>>>>
>
> John> Hello All,
> John> I'm having some trouble getting the <html:select> tag to recognize the "value"
> John> attribute in order to set the appropriate enclosed option to selected. It
> John> works fine with a simple string, but doesn't seem to recognize a RT expression.
>
> John> Here's the code sample:
>
> John> <html:select
> John> property="mapservicename"
> John> value="${mapserviceDetailForm.mapservice.name}">
> John> <html:optionsCollection
> John> label="name"
> John> property="mapserviceList"
> John> value="name" />
> John> </html:select>
>
> John> There is a bean "mapservice" contained in mapserviceDetailForm, and it has a
> John> property "name" that should identify the option to be selected.
>
> John> Can anyone point out what I'm doing wrong?
>
>Well, technically you're not using an "RT" expression, but an "EL" expression.
>Those will only work with the Struts-EL library (or the JSTL). You're
>obviously somewhat familiar with that, or you wouldn't have tried this.
>
>Does that tell you what you need to know?
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: tag and the value attribute
Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "John" == John C Cartwright <John> writes:
John> Hello All,
John> I'm having some trouble getting the <html:select> tag to recognize the "value"
John> attribute in order to set the appropriate enclosed option to selected. It
John> works fine with a simple string, but doesn't seem to recognize a RT expression.
John> Here's the code sample:
John> <html:select
John> property="mapservicename"
John> value="${mapserviceDetailForm.mapservice.name}">
John> <html:optionsCollection
John> label="name"
John> property="mapserviceList"
John> value="name" />
John> </html:select>
John> There is a bean "mapservice" contained in mapserviceDetailForm, and it has a
John> property "name" that should identify the option to be selected.
John> Can anyone point out what I'm doing wrong?
Well, technically you're not using an "RT" expression, but an "EL" expression.
Those will only work with the Struts-EL library (or the JSTL). You're
obviously somewhat familiar with that, or you wouldn't have tried this.
Does that tell you what you need to know?
--
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net ; SCJP; SCWCD
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org