Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I use the “options” tag with a collection of options stored in my ActionForm bean?

0
Posted

How can I use the “options” tag with a collection of options stored in my ActionForm bean?

0

Location: http://www.jguru.com/faq/view.jsp?EID=549097 Created: Nov 16, 2001 Author: Ted Husted (http://www.jguru.com/guru/viewbio.jsp?EID=462042) Question originally posed by kriss j (http://www.jguru.com/guru/viewbio.jsp?EID=531542 The properties for options are very confusing, and there’s talk on DEV of an alternate tag, optimized to use something like the LabelValue beans. Here’s how to use the current options tag when the LabelValue collection (from the Example) has been stored as a property on the ActionForm. If you want to provide the collection through an ActionForm method, you need to define a scripting variable first. Then If you wanted to build the list from a static method in your business layer, a simple one could look like this: public static String getMyO

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123