sergio

Greenhorn
+ Follow
since Oct 03, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sergio

As far as variables concerned, I don't think I am confused. 'telephoneNumbers' is a vector property - I can get it via html:text... or bean:write
'String telephoneNumber' has indexed getter/setter methods which get/set above-mentioned Vector elements.
The thing is that both 'Vector telephoneNumbers' and 'String telephoneNumber' with all their getter/setter methods are in the same bean object. I also added identical methods into 'ActionForm' class but could set anything for this property, of course, yet.
I can print the Vector property via <bean:write name="tel"/> without 'property' attribute, because it's not a bean. But I need to to iterate over each its vector element and show it in its own, indexed text form field.
However, it looks like <html:text.../> needs a 'property=...' attribute (required!), but what should my "tel" object be in this case? I am using 'telephoneNumber' String property in the same bean object (where 'telephoneNumbers' is found)! Is it gonna work? It doesn't really make sense to create a totally separate bean object just to hold a single phone number to be kept in the Vector 'telephoneNumbers' to be able to use <html:text name="tel" property="telephoneNumber" indexed="true"/>
Could it be that because it's the same bean, I am getting an error about Collection (telephoneNumbers) property (which is accessible otherwise), because <html:text.../> is getting confused?
20 years ago
I have the following:
<td>
<logic:iterate name="currentUser" id="tel" property="telephoneNumbers" indexId="index">
<html:text name="tel" property="telephoneNumber" indexed="true" size="20"/>
</logic:iterate>
<!-- THIS LINE WORKS AND IT PRINTS VECTOR CONTENTS -->
<html:text name="currentUser" property="telephoneNumbers" size="20"/>
</td>
As result, I am getting:
No getter method for property telephoneNumbers of bean tel
I can't figure out which getter/setter and where I need to have. I put indexed getter/setters into the same bean where Vector telephoneNumbers is, for String telephoneNumber. Also, i put getter/setter (same) into Action Form... still same error.
Anybody can provide any hints?
Thanks a million
20 years ago