aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "about indexed properties" Watch "about indexed properties" New topic
Author

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?

tnks
[ 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)
{
labelValueList.set(index,bean);
}
Marc Peabody
pie sneak
Sheriff

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.
 
jQuery in Action, 2nd edition
 
subject: about indexed properties