Rick,

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

http://cvs.apache.org/dist/struts/v1.2.4/

Niall

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


> Hubert Rabago wrote the following on 9/15/2004 9:25 PM:
> > Wow.  You're using the <nested> tags for this form, right?
>
> Of course:)
>
> > I haven't tried this yet, but there's a chance you might be able to
> > define a form with a field that matches FooBar:
> >
> > class MyForm {
> >     FooBarForm fooBar; // then you'll have your accessors, of course
> >
> >     class FooBarForm {
> >         Integer id;
> >         String value;
> >         String type;
> >         Collection fooBars;
> >         // define accessors
> >         /** no-arg constructor */
> >         FooBarForm () {
> >            fooBars = ListUtils.lazyList(new ArrayList(), new Factory() {
> >                  public Object create() {
> >                      return new FooBarForm();
> >                  }
> >             });
> >         }
> >     }
> > }
>
> 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).
> I also need to eventually return this object back to the backend. So
> remember I'm dealing with an Object of type FooBar that has a collection
> of FooBars inside and potentially FooBars inside of FooBars.  I guess I
> can try initializing the Collection with a lazyList in a no arg
> constructor of these business value objects? (assuming the backend guy
> won't mind:)
>
> -- 
> Rick



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

Reply via email to