File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:option" Watch "html:option" New topic


Santhosh Reddy

Joined: Sep 25, 2006
Posts: 27
In the value attribute of <html ption> the bean:write tag used is not executing,pls can anyone helpe me
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I suspect this is happening because you're trying to write something like this:
This won't work because you can't embed one custom tag inside another. However, with almost all of the html:xx tags, if you provide a body for the tag, its value will be used for the value attruibute. So, the following will work:

Also, if you're iterating over a collection of JavaBeans to get the options, I'd suggest you look into using the <htmlptionsCollection /> tag instead.
[ August 13, 2007: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link:
subject: html:option
It's not a secret anymore!