I am trying to set some indexed properties on an object, Payment, using the
WW1.4 BeanUtil class.

class Payment
{
    public Set getAllocations()
    public void setAllocations(Set set)
    public Allocation getAllocation(int index)
}

I have the following properties set in the request
allocation[0]/comments

I have also tried (with similar error)

allocation[0].comments

When I call:

BeanUtil.setProperties(ActionContext.getContext().getParameters(), payment);

on a Payment with 1 Allocation in its set, I get the following error.

java.lang.IllegalArgumentException: Could not set parameter
"allocation[0]/comments":java.lang.IllegalArgumentException: Attempting to
set a indexed field allocation as an non-indexed field
    at
webwork.util.BeanUtil.setProperties(Ljava.util.Map;Ljava.lang.Object;)V(Bean
Util.java:193)
    at
xxx.action.PaymentAction.doCreateAllocations()Ljava.lang.String;(PaymentActi
on.java:126)
    ...


Can WW 1.4 handle the indexed properties? or am I doing something wrong or
missing something?

Thanks in advance,
Frank




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to