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

about indexed properties

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
In a form bean i create an indexed properties as this:

the problem is that in Struts tutorial there is only the get method and not the set one

I am doing the right thing to adding the set methods, otherwise how works indexed properties?

[ October 06, 2005: Message edited by: Marco Vanoli ]

bye, <br />Marco
Vani Bandargal
Ranch Hand

Joined: Oct 06, 2005
Posts: 82
try this:

public void setPar(int index,LabelValueBean bean)
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

The BeanUtils (which Struts uses to populate the ActionForms) calls the getter and takes the collection returned to set all the individual values on its own.

It does not use a setter.

A good workman is known by his tools.
I agree. Here's the link:
subject: about indexed properties
jQuery in Action, 3rd edition