Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about indexed properties

 
Marco Vanoli
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Vani Bandargal
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this:

public void setPar(int index,LabelValueBean bean)
{
labelValueList.set(index,bean);
}
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic