Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Class inheritance on actionform property object array

Status
Not open for further replies.

bluecrush

Programmer
Mar 26, 2004
61
0
0
US
I have an actionform with a property that is a vector of objects which extend a superclass. I am having difficulty accessing the properties of the child class (objects in the vector) which are inherited from the superclass. My question is, do the inherited properties have to have the getter and setter methods overridden in the child class or is struts smart enough to find them in the superclass?
 
Alrighty...I discovered that you don't have to override anything. When you iterate on the vector of objects, you just have to declare the type and give it an id that matches your indexed getter and setter methods, then set indexed equal to true on your html form object properties. Pretty simple once you figure it out! [pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top