Re: Not happy with approaches.. looking for better/other suggestions

2004-09-12 Thread Yves Sy
this > in my JDK1.4.2. > > Thanks > > > > > - Original Message - > From: "Hubert Rabago" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, September 03, 2004 7:40 AM > Subj

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-12 Thread Peng Tuck Kwok
o" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, September 03, 2004 7:40 AM > Subject: Re: Not happy with approaches.. looking for better/other > suggestions > > > Have you tried using ListUtils.lazyList(

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-12 Thread struts Dude
4 7:40 AM Subject: Re: Not happy with approaches.. looking for better/other suggestions > Have you tried using ListUtils.lazyList() for this? I just tried it > on a sample app and it works in cases like this. > > - Hubert > > On Thu, 02 Sep 2004 14:27:32 -0400, Rick Reumann <[EMAIL

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Rick Reumann
Hubert Rabago wrote: public void reset(ActionMapping mapping, HttpServletRequest request) { super.reset(mapping, request); accessDefinitions = ListUtils.lazyList(new java.util.ArrayList(), new Factory() { public Object create() {

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Hubert Rabago
It doesn't. What happens is, when Struts tries to access the nth bean to populate it, the lazyList creates a bean and puts it at the nth index. Here's what I put in my ActionForm: public class CollForm extends ActionForm { Collection accessDefinitions; public Collection get

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Rick Reumann
Hubert Rabago wrote: Have you tried using ListUtils.lazyList() for this? I just tried it on a sample app and it works in cases like this. No I haven't tried that. Even with that, how is the lazy load going to know the size to load without calling a business class behind the scenes? (which seems

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Hubert Rabago
Have you tried using ListUtils.lazyList() for this? I just tried it on a sample app and it works in cases like this. - Hubert On Thu, 02 Sep 2004 14:27:32 -0400, Rick Reumann <[EMAIL PROTECTED]> wrote: > One of the most frustrating things I run into when developing Struts > applications is the p

Re: Not happy with approaches.. looking for better/other suggestions

2004-09-02 Thread Woodchuck
hi Rick, have you tried defining the following in your ActionForm? (assuming your collection has MyFooBar objects): public MyFooBar getAccessDefinitions(int i) { if(null == accessDefinitions) accessDefinitions = new ArrayList(); while(i >= accessDefinitions.size()) ((ArrayList)accessD