It doesn't, but I was just answering the first issue in your reply to Hubert
when you said....

"I don't see how this is going to work though. The problem is I'm getting
back an Object (the FooBar one) from the back end that has the nested
collections inside. This isn't a Struts object (not of type ActionForm)."

Hadn't really been following this thread, but isn't the trick to getting
round the BeanUtils issue all in the getFooBar(index) method. I don't use
LazyList, but if it was an array - wouldn't something like the following
work

private FooBar[] fooBars;

public FooBar getFooBar(int index) {

    if (fooBars == null) {
        fooBars = new FooBar[index];
    }

    if (fooBars.length <= index) {
        FooBar[] newFooBars = new FooBar[index + 1];
        System.arraycopy(foobars, 0, newFooBars, 0, fooBars.length);
        fooBars = newFooBars;
    }

    if (fooBars[index] == null) {
        fooBars[index] = new FooBar();
    }

    return fooBars[index];

}

Niall

----- Original Message ----- 
From: "Rick Reumann" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, September 16, 2004 5:12 AM
Subject: Re: Think I'm stuck with using Session scope for this..unless a
better idea?


> Niall Pemberton wrote the following on 9/16/2004 12:11 AM:
>
> > Doesn't matter if its not an ActionForm if you use Struts 1.2.4 - it
will
> > just "wrap" it in one - try just specifying your FooBar class in the
> > struts-config.xml
> >
> >     <form-bean name="FooBar" type="myPackage.FooBar">
>
> Sorry for being dense here but I still don't see how that helps with the
> problem. The problem are the null lists inside of myPackage.FooBar that
> BeanUtils is going to try to populate.
>
>
> -- 
> Rick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to