I thought that's how the Introspector finds indexed properties? Doesn't BeanUtils use the Introspector?
> -----Original Message----- > From: Hani Suleiman [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 07, 2003 7:37 PM > To: [EMAIL PROTECTED] > Subject: Spam:Re: Spam:[OS-webwork] WebWork 1.4 and indexed properties > > > Well, of course not. You'd have to call it yourself, there is > no magic > to figure out that that's the method you want. > > Secondly, even if you do call it, it's a pretty stupid idea and won't > work anyway, since you'd have to write the impl for it yourself, and > last I knew, it's not possible to index into Sets. Did you > try changing > your Set to a List and seeing if that works? > > I'd recommend AGAINST adding junk accessor methods like this. > They just > add clutter and code for absolutely no gain. > > On Dec 7, 2003, at 7:30 PM, Frank Febbraro wrote: > > > 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 > > > > > > ------------------------------------------------------- > 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