Hi Brian,

There really isn't a way to essentially create a bean on-the-fly... not a
true bean with accessors and mutators for private fields that is... the
LazyActionForm is about as close as you are going to get.

I've never looked at the source, but my *guess* would be that Niall is
populating a Map directly from Request in the reset() method of
LazyActionForm... whether that is correct or not, what you could do it
write your own ActionForm subclass that does this, and only pulls those
parameters from Request that you are interested in, and put them in a Map.
 Then it's a simple matter to expose a get() method like LazyActionForm
does.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Fri, October 28, 2005 12:41 pm, Brian Demers said:
> Currently thats what I am doing.  Because of that I have to filter out
> the 'method' parameter.  I was just looking if there was a clean way
> to do this.
>
> -Brian Demers
>
> On 10/28/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>> Would not it be simpler to read directly from request?
>>
>> On 10/28/05, Brian Demers <[EMAIL PROTECTED]> wrote:
>> > I don't know if thats what i am looking for either?
>> >
>> > My field names could be XXX, YYY, and ZZZ for one submit
>> > and then AAA, BBB, CCC another.
>> >
>> > There is no way of knowing what parameters i will get.
>> >
>> > -Brian
>> >
>> > On 10/28/05, David Evans <[EMAIL PROTECTED]> wrote:
>> > > I think this might help:
>> > > http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html
>> > >
>> > >
>> > > On Fri, 2005-10-28 at 08:15, Brian Demers wrote:
>> > > > Hello all,
>> > > >
>> > > > I am creating a dynamic struts application. I don't think
>> > > > DynaActionForm is what I am looking for.
>> > > >
>> > > > My page contains many input fields which are dynamically generated
>> at
>> > > > run time.  Is there any way to put these fields into a struts
>> form?
>> > > > From what I have read, fields for a DynaActionForm need to be
>> defined
>> > > > in the struts-config (which is not dynamic).
>> > > >
>> > > > My other alternative is just to grab the parameters from the
>> request.
>> > > >
>> > > > Does anyone have any ideas?
>> > > >
>> > > > -Brian Demers
>> > > >
>> > > > ---------------------------------------------------------------------
>> > > > 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]
>> > >
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > 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]
>>
>>
>
> ---------------------------------------------------------------------
> 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