struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Seong" <sse...@megapathdsl.net>
Subject Re: Need help with html:select and html:options
Date Sat, 25 Jan 2003 00:36:12 GMT
Yes, I do have dyna from-bean defined for "month" and "day" in the
struts-config.xml.


----- Original Message -----
From: "Suresh Addagalla" <suresh.addagalla@wipro.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Friday, January 24, 2003 12:03 AM
Subject: RE: Need help with html:select and html:options


> Check if you have month & day properties defined in your form bean.
>
> Suresh
>
> >-----Original Message-----
> >From: Scott Seong [mailto:sseong@megapathdsl.net]
> >Sent: Friday, January 24, 2003 11:32 AM
> >To: Struts Users Mailing List
> >Subject: Need help with html:select and html:options
> >
> >
> >Hello,
> >
> >I'm having trouble with html:select and html:options. Basically, I have
> >three select/options pairs in a JSP page, and the result is complaining
> >about "No getter method available for Property month for bean
> >name under
> >org.apache...". Here is the code sample:
> >
> ><%
> >Vector states = new Vector();
> >
> >states.add(new LabelValueBean("Alabama", "AL"));
> >
> >states.add(new LabelValueBean("Alaska", "AK"));
> >
> >...
> >
> >pageContext.setAttribute( "states", states);
> >
> >Vector months = new Vector();
> >
> >months.add(new LabelValueBean("Month", "00"));
> >
> >months.add(new LabelValueBean("January", "01"));
> >
> >...
> >
> >pageContext.setAttribute( "months", months);
> >
> >
> >
> >Vector days = new Vector();
> >
> >days.add(new LabelValueBean("Day", "00"));
> >
> >days.add(new LabelValueBean("1", "01"));
> >
> >...
> >
> >pageContext.setAttribute( "days", days);
> >
> >%>
> >
> >
> >Then, I have html:select and html:options tags as shown below:
> ><html:select property="state" size="1" tabindex="9">
> >
> ><html:options collection="states" property="value"
> >labelProperty="label" />
> >
> ></html:select>
> >
> ><html:select property="month" size="1" tabindex="11">
> >
> ><html:options collection="months" property="mValue"
> >labelProperty="mLabel"
> >/>
> >
> ></html:select>
> >
> ><html:select property="day" size="1" tabindex="11">
> >
> ><html:options collection="days" property="dValue"
> >labelProperty="dLabel" />
> >
> ></html:select>
> >
> >
> >
> >The JSP chokes at the 2nd select/options, and I don't know
> >why. If I remove
> >2nd and third pair, the JSP seems to work fine. Can someone help?
> >
> >Thanks,
> >Scott
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:struts-user->unsubscribe@jakarta.apache.org>
> >For
> >additional commands,
> >e-mail: <mailto:struts-user-help@jakarta.apache.org>
> >
>
>




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


Mime
View raw message