You will need to use Struts-EL taglib then you should be able to do what you want.

http://jakarta.apache.org/struts/faqs/struts-el.html

 <html:select property="no_account">
  <c:forEach var="accounts" items="${Accounts}" varStatus="status">
   <html_el:option value="${account.no_account}">
   <c:out value="${accounts.number}"</html_el:option> 
  </c:forEach>
 </html:select>

You might also investigate using the <html:optionsCollection .../>
or the <html:options .../> 

http://jakarta.apache.org/struts/userGuide/struts-html


robert

> -----Original Message-----
> From: Steltner, Joern [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 19, 2004 7:28 AM
> To: [EMAIL PROTECTED]
> Subject: access variable value in html tag
> 
> 
> Dear,
> 
> I'm not an expert in Struts and Java. I need some simple help:
> 
> <html:select property="no_account">
>  <c:forEach var="accounts" items="${Accounts}" varStatus="status">
>   <html:option value="????????"><c:out
> value="${accounts.number}"</html:option> 
>  </c:forEach>
> </html:select>
> 
> Everything works fine, but at ??????? mark I would like take
> account.no_account like ${accounts.number}, but it doesn't work. May someone
> can give me a small note about the right syntax to get the value from
> accounts.number as text in the quotes.
> 
> Thanks
> 
> Regards
> J. Steltner
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to