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

2004-09-12 Thread struts Dude
Just a silly question. Where did ListUtils come from?? I can't find 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 Subject: Re: Not happy with approaches..

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

2004-09-12 Thread Yves Sy
Dude all you have to do is do something as simple as entering ListUtils in Google and you'll find out. -Yves- On Mon, 13 Sep 2004 17:04:18 +1200, struts Dude [EMAIL PROTECTED] wrote: Just a silly question. Where did ListUtils come from?? I can't find this in my JDK1.4.2. Thanks

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())

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

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
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

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() {