Re: @StrutsParameter
Prasanth <[email protected]> Thu, 25 Sep 2025 10:23:44 -0500
| Newsgroups | gmane.comp.jakarta.struts.user |
|---|---|
| Message-ID | <[email protected]> |
In the below code the get method is annotated with @StrutsParameter. This works.
@StrutsParameter (depth = 1)
public Vector<String> getDistributionAmounts() {
return this.distributionAmounts;
}
Here the set method is annotated with @StrutsParameter.
@StrutsParameter
public void setContacts(ArrayList<Long> contacts) {
this.contacts = contacts;
}
As you can see above which method (getXXX/setXXX) has to be annotated is changing between Vector and ArrayList.
Thanks,
Prasanth
On 9/14/25 8:25 AM, Lukasz Lenart wrote:
> czw., 21 sie 2025 o 19:18 Prasanth <[email protected]> napisał(a):
>> Is the struts parameter tag supposed to be on setXXX method or getXXX method for a check box list when the argument is Vector/ArrayList?. We have old code that takes the data as a vector, for this we
>> have the parameter on the getXXX and it works well. For another action that has ArrayList as parameter we had to move it from the getXXX to setXXX for it to work. We had to annotate the getXXX methods
>> when the argument is a map, with depth of 1.
>>
>> Is Vector handled differently than ArrayList when injecting parameter values?
> Not sure if I understood your question, could write an example code and post it?
>
>
> Cheers
> Łukasz
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>