Hi Mark,

I followed your instruction and use the following code but didn't succeed.

        <html:select size="1" property="currency">
            <html:options collection="currencyList"
property="id"/></html:options>
        </html:select>

I have the following error:

/admin/CreateMerchant.jsp(138): Non-matching extension tags
probably occurred due to an error in /admin/CreateMerchant.jsp line 138:
<html:options name="currency" collection="currencyList" property="id"
labelProperty="id"/></html:options>

If I use "currency.id" instead of "currency" in html:select, I have the same
error.

I think I should clarify my previous message.

> <html:select size="1" property="currency" value="<bean:write
> name='merchantForm' property='currency'/>">
>     <logic:iterate id="currency" name="currencyList">
>         <html:option value="<bean:write name='currency'
> property='id'/>"><bean:write name='currency' property='id'/>
>         </html:option>
>    </logic:iterate>
> </html:select>

In this JSP segment I want to have select options which are populated by the
collection currencyList. This currencyList is actually an Enumeration, not a
Collection but I think Enumeration is also supported by Struts. The default
value for select is the value of property "currency" of merchantForm (which
is a subclass of ActionForm).

What should be done?

Thanks in advance.

Quan

----- Original Message -----
From: Geddes, Mark (ANTS) <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 3:05 PM
Subject: RE: Set html:option value with bean:write


>
> Assuming your form is already associated with 'merchantForm' FormBean, and
> that 'currencyList' is a Collection, try:
>
> <html:select property="currency">
> <html:options collection="currencyList" property="id"
> labelProperty="id"/>
> </html:select>
>
> Mark
>
> -----Original Message-----
> From: Pham Thanh Quan [mailto:[EMAIL PROTECTED]]
> Sent: 02 July 2001 09:04
> To: [EMAIL PROTECTED]
> Subject: Set html:option value with bean:write
>
>
> Hi all,
>
> i want to set the value of html:option to the corresponding currency.id as
> in the following (broken) jsp segment
>
> <html:select size="1" property="currency" value="<bean:write
> name='merchantForm' property='currency'/>">
>     <logic:iterate id="currency" name="currencyList">
>         <html:option value="<bean:write name='currency'
> property='id'/>"><bean:write name='currency' property='id'/>
>         </html:option>
>    </logic:iterate>
> </html:select>
>
> Please help !
>
> Quan
>
>
>
>
***************************************************************************
> This email message contains confidential information for the above
addressee only.  If you are not the intended addressee you must not disclose
or use the information in any manner whatsoever.
>
> Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.
>
> Unless otherwise stated this email message is not intended to be
contractually binding.  Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.
>
> Abbey National Treasury Services plc. Registered in England. Registered
Office:  Abbey House, Baker Street, London NW1 6XL.  Company Registration
No: 2338548.  Regulated by the SFA
>
***************************************************************************
>

Reply via email to