You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Anand Raman <an...@mymailbag.com> on 2001/03/08 17:09:16 UTC
significance of property attribute in select tag
hi guys
What exactly should be the value of the property attribute of select tag
I am using a string and it reports that the value doesnt confirm to the
TLD.
<html:select property="paymentMode">
<html:options collection="paymentModeList" property="id" labelproperty="value"/>
</html:select>
Tomcat reports that the property attribute's value doesnt confirm to the TLD.
Surprisingly it has been working in some other jsp files..
However when i use
<html:select property="<%= new String("paymentMode") %>">
<html:options collection="paymentModeList" property="id" labelproperty="value"/>
</html:select>
Tomcat reports ::: Attribute paymentMode has no value
Please clarify
Thanks
Anand Raman
Re: significance of property attribute in select tag
Posted by Martin Cooper <ma...@tumbleweed.com>.
Working from the example you gave, the <html:select> tag would use the
string obtained by calling yourFormBean.getPaymentMode() to determine which
of the options is initially selected when the page is displayed. It uses
yourFormBean because that is the default bean when no "name=" attribute is
specified for the <html:select> tag.
Hope this helps.
--
Martin Cooper
----- Original Message -----
From: "Anand Raman" <an...@mymailbag.com>
To: "struts" <st...@jakarta.apache.org>
Sent: Thursday, March 08, 2001 8:09 AM
Subject: significance of property attribute in select tag
> hi guys
>
> What exactly should be the value of the property attribute of select tag
>
> I am using a string and it reports that the value doesnt confirm to the
> TLD.
>
> <html:select property="paymentMode">
> <html:options collection="paymentModeList" property="id"
labelproperty="value"/>
> </html:select>
>
> Tomcat reports that the property attribute's value doesnt confirm to the
TLD.
>
> Surprisingly it has been working in some other jsp files..
>
> However when i use
>
> <html:select property="<%= new String("paymentMode") %>">
> <html:options collection="paymentModeList" property="id"
labelproperty="value"/>
> </html:select>
> Tomcat reports ::: Attribute paymentMode has no value
>
> Please clarify
>
> Thanks
> Anand Raman