struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mitchell <jmitch...@apache.org>
Subject Re: Month dropdown field error
Date Wed, 26 Mar 2003 15:25:40 GMT
On Wed, 2003-03-26 at 10:20, Paul Blundell wrote:
> I am trying to create a month dropdown dropdown using the datetime 'dt' tag.
> 
> The following code results in an error:
> 
> <html:select property="startMonth">
>   <html:option value="Month"/>
>   <dt:months id="mon" locale="true">
>     <html:option value="<jsp:getProperty name="mon"
> property="monthOfYear"/>">
>   </dt:months>
> </html:select>
> 
> Any ideas?

Yes, you can't embed tags within tags.  Take a look at <html:options>
tag or if you only need a single value from a bean use:

 <bean:define id="month" name="mon" property="monthOfYear/>

 <html:select property="startMonth">
   <html:option value="Month"/>
   <dt:months id="mon" locale="true">
     <html:option value="<%=month%>">
   </dt:months>
 </html:select>

> 
> Thanks
> Paul
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
-- 
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org




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


Mime
View raw message