I have tried exposing the setAllocation(int index. Allocation alloc) method too. It never gets called and the same error message is generated.
----- Original Message ----- From: "Jason Carreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 07, 2003 1:49 PM Subject: RE: Spam:[OS-webwork] WebWork 1.4 and indexed properties You might want to expose getters and setters like this: void setAllocation(int index, Allocation alloc) Allocation getAllocation(int index) > -----Original Message----- > From: Frank Febbraro [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2003 12:10 PM > To: [EMAIL PROTECTED] > Subject: Spam:[OS-webwork] WebWork 1.4 and indexed properties > > > 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().getParameter > s(), 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.Strin > g;(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 > ------------------------------------------------------- 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 ------------------------------------------------------- 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