aspose file tools
The moose likes Struts and the fly likes How to populate a drop down box built with Struts html tag dynamically with the iterator Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "How to populate a drop down box built with Struts html tag dynamically with the iterator" Watch "How to populate a drop down box built with Struts html tag dynamically with the iterator" New topic
Author

How to populate a drop down box built with Struts html tag dynamically with the iterator

Cam Cres
Greenhorn

Joined: Apr 16, 2010
Posts: 2
Hello. I'm trying to populate a select field with options coming from an array list. I cannot use optionsCollection because I have to assign an id to every option element (it's a requirement I cannot bypass). My idea was to use an iterator within the select tag, but i get an JSP compile exception. It has to do with the way I add the value attribute in the option element. Below is the code:



It doesn't even compile. It complains that codeBean cannot be resolved.

When I try:



There is another exception. Now it says there is a problem in the attribute codeBean.

Any suggestions? Thanks in advance for your time...
Praison Selvaraj
Ranch Hand

Joined: Jun 05, 2010
Posts: 46
Hi,

You cannot have one custom tag nested inside another. <bean:write nested in <html option is not valid


Thanks,
Praison


SCJP, SCWCD, SCEA
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to populate a drop down box built with Struts html tag dynamically with the iterator
 
Similar Threads
create select list from lag library without using struts
logic:match , logic:notEqual not working
Struts ArrayList Display in JSP
dependable or linked dropdown lists
html:option woes