You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "tsmets@tsmets.lautre.net" <ts...@tsmets.lautre.net> on 2004/05/19 03:32:48 UTC

Mulitple Forms per Submits

Is there a clean way to have multiple Forms posted when the user click 
the Submit buttons ?
Basically, instead of  extending various Forms to have some code re-use 
I think it would be much more interresting  to have the possibility to 
post multiple Forms instead of having a Specific form extending generic 
forms... ?

Tx for any help,

\T,





-- 


Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels
Tel. : +32 (0)2 742 05 94
GSM : +32 (0)497 44 68 12




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Mulitple Forms per Submits

Posted by Thomas SMETS <ts...@tsmets.lautre.net>.
Okay,
Say you have many forms you have to write.
These forms have (sometimes) very little to do with each others but for
the fact that they belong to the same application. For instance, people
can introduce periods (from a date, to a date) for a specific reason
(product validity) but also period for selecting movies...
I'd like to have a PeriodForm object which would deal with the validation
of the date : _ StartDate < EndDate
 _ Day typed are valid dates
 _ ...

For that I can do two simple things :
a) MyCustomForm extends the DateForm
b) MyCustomForm delegates to the DateForm
   & just provides the right interface.

Another option would be to have a reference to the DateForm in the
MyCustomForm but the system would automatically delegate all the date
relate infos to the DateForm...
Is this possible & HOW ?

Is this clearer ?

Tia,

\T,



>
> Could you please restate (or at least clarify) your question?
> I don't think I fully understand what you are asking.
>
>
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> EdgeTech, Inc.
> 678.910.8017
> AIM: jmitchtx
>
> ----- Original Message -----
> From: <ts...@tsmets.lautre.net>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Tuesday, May 18, 2004 9:32 PM
> Subject: Mulitple Forms per Submits
>
>
>>
>> Is there a clean way to have multiple Forms posted when the user click
>>  the Submit buttons ?
>> Basically, instead of  extending various Forms to have some code
>> re-use  I think it would be much more interresting  to have the
>> possibility to  post multiple Forms instead of having a Specific form
>> extending generic  forms... ?
>>
>> Tx for any help,
>>
>> \T,
>>
>>
>>
>>
>>
-- 
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multiple Forms per Submits

Posted by "tsmets@tsmets.lautre.net" <ts...@tsmets.lautre.net>.
It works but the syntax is a bit weird..

\T,



David Friedman wrote:

>Hey James,
>
>Why not nest your form beans inside another, main form bean?  Then you could
>access them using dot notation mainBean.thatBean.thisProperty,
>mainBean.someOtherBean.thatOtherProperty, etc.
>
>Regards,
>David
>
>-----Original Message-----
>From: Michael McGrady [mailto:mike@michaelmcgrady.com]
>Sent: Tuesday, May 18, 2004 11:09 PM
>To: Struts Users Mailing List
>Cc: Struts Users Mailing List
>Subject: Re: Multiple Forms per Submits
>
>
>The technical answer to your question, if it is taken literally to be about
>the client side, is that with HTML you can only have the values of one form
>on a response page submitted with a request from the client.  If you are
>thinking truly about submitting multiple forms on one page, why not just
>make it one form?  I think you probably, as James apparently also thinks,
>must mean something else.  The reason you must is that extending forms on
>the server side really is fairly unrelated to what you do on the client
>side.
>
>If you are talking about the server, there is also an answer.  You can do
>just about anything you want to do with form objects.  Most of the things
>you can do are ill-advised, but the alternatives are vast indeed.
>
>Michael McGrady
>
>At 07:38 PM 5/18/2004, James Mitchell wrote:
>  
>
>>Could you please restate (or at least clarify) your question?
>>I don't think I fully understand what you are asking.
>>
>>
>>--
>>James Mitchell
>>Software Engineer / Open Source Evangelist
>>EdgeTech, Inc.
>>678.910.8017
>>AIM: jmitchtx
>>
>>----- Original Message -----
>>From: <ts...@tsmets.lautre.net>
>>To: "Struts Users Mailing List" <us...@struts.apache.org>
>>Sent: Tuesday, May 18, 2004 9:32 PM
>>Subject: Mulitple Forms per Submits
>>
>>
>>    
>>
>>>Is there a clean way to have multiple Forms posted when the user click
>>>the Submit buttons ?
>>>Basically, instead of  extending various Forms to have some code re-use
>>>I think it would be much more interresting  to have the possibility to
>>>post multiple Forms instead of having a Specific form extending generic
>>>forms... ?
>>>
>>>Tx for any help,
>>>
>>>\T,
>>>
>>>
>>>
>>>
>>>
>>>--
>>>
>>>
>>>Thomas SMETS
>>>rue J. Wytsmanstraat 62
>>>1050 Brussels
>>>Tel. : +32 (0)2 742 05 94
>>>GSM : +32 (0)497 44 68 12
>>>
>>>      
>>>


-- 


Thomas SMETS
rue J. Wytsmanstraat 62
1050 Brussels
Tel. : +32 (0)2 742 05 94
GSM : +32 (0)497 44 68 12




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Multiple Forms per Submits

Posted by David Friedman <hu...@ix.netcom.com>.
Hey James,

Why not nest your form beans inside another, main form bean?  Then you could
access them using dot notation mainBean.thatBean.thisProperty,
mainBean.someOtherBean.thatOtherProperty, etc.

Regards,
David

-----Original Message-----
From: Michael McGrady [mailto:mike@michaelmcgrady.com]
Sent: Tuesday, May 18, 2004 11:09 PM
To: Struts Users Mailing List
Cc: Struts Users Mailing List
Subject: Re: Multiple Forms per Submits


The technical answer to your question, if it is taken literally to be about
the client side, is that with HTML you can only have the values of one form
on a response page submitted with a request from the client.  If you are
thinking truly about submitting multiple forms on one page, why not just
make it one form?  I think you probably, as James apparently also thinks,
must mean something else.  The reason you must is that extending forms on
the server side really is fairly unrelated to what you do on the client
side.

If you are talking about the server, there is also an answer.  You can do
just about anything you want to do with form objects.  Most of the things
you can do are ill-advised, but the alternatives are vast indeed.

Michael McGrady

At 07:38 PM 5/18/2004, James Mitchell wrote:
>Could you please restate (or at least clarify) your question?
>I don't think I fully understand what you are asking.
>
>
>--
>James Mitchell
>Software Engineer / Open Source Evangelist
>EdgeTech, Inc.
>678.910.8017
>AIM: jmitchtx
>
>----- Original Message -----
>From: <ts...@tsmets.lautre.net>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Sent: Tuesday, May 18, 2004 9:32 PM
>Subject: Mulitple Forms per Submits
>
>
> >
> > Is there a clean way to have multiple Forms posted when the user click
> > the Submit buttons ?
> > Basically, instead of  extending various Forms to have some code re-use
> > I think it would be much more interresting  to have the possibility to
> > post multiple Forms instead of having a Specific form extending generic
> > forms... ?
> >
> > Tx for any help,
> >
> > \T,
> >
> >
> >
> >
> >
> > --
> >
> >
> > Thomas SMETS
> > rue J. Wytsmanstraat 62
> > 1050 Brussels
> > Tel. : +32 (0)2 742 05 94
> > GSM : +32 (0)497 44 68 12
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multiple Forms per Submits

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
The technical answer to your question, if it is taken literally to be about 
the client side, is that with HTML you can only have the values of one form 
on a response page submitted with a request from the client.  If you are 
thinking truly about submitting multiple forms on one page, why not just 
make it one form?  I think you probably, as James apparently also thinks, 
must mean something else.  The reason you must is that extending forms on 
the server side really is fairly unrelated to what you do on the client side.

If you are talking about the server, there is also an answer.  You can do 
just about anything you want to do with form objects.  Most of the things 
you can do are ill-advised, but the alternatives are vast indeed.

Michael McGrady

At 07:38 PM 5/18/2004, James Mitchell wrote:
>Could you please restate (or at least clarify) your question?
>I don't think I fully understand what you are asking.
>
>
>--
>James Mitchell
>Software Engineer / Open Source Evangelist
>EdgeTech, Inc.
>678.910.8017
>AIM: jmitchtx
>
>----- Original Message -----
>From: <ts...@tsmets.lautre.net>
>To: "Struts Users Mailing List" <us...@struts.apache.org>
>Sent: Tuesday, May 18, 2004 9:32 PM
>Subject: Mulitple Forms per Submits
>
>
> >
> > Is there a clean way to have multiple Forms posted when the user click
> > the Submit buttons ?
> > Basically, instead of  extending various Forms to have some code re-use
> > I think it would be much more interresting  to have the possibility to
> > post multiple Forms instead of having a Specific form extending generic
> > forms... ?
> >
> > Tx for any help,
> >
> > \T,
> >
> >
> >
> >
> >
> > --
> >
> >
> > Thomas SMETS
> > rue J. Wytsmanstraat 62
> > 1050 Brussels
> > Tel. : +32 (0)2 742 05 94
> > GSM : +32 (0)497 44 68 12
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org

Re: Mulitple Forms per Submits

Posted by James Mitchell <jm...@apache.org>.
Could you please restate (or at least clarify) your question?  
I don't think I fully understand what you are asking.


--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

----- Original Message ----- 
From: <ts...@tsmets.lautre.net>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, May 18, 2004 9:32 PM
Subject: Mulitple Forms per Submits


> 
> Is there a clean way to have multiple Forms posted when the user click 
> the Submit buttons ?
> Basically, instead of  extending various Forms to have some code re-use 
> I think it would be much more interresting  to have the possibility to 
> post multiple Forms instead of having a Specific form extending generic 
> forms... ?
> 
> Tx for any help,
> 
> \T,
> 
> 
> 
> 
> 
> -- 
> 
> 
> Thomas SMETS
> rue J. Wytsmanstraat 62
> 1050 Brussels
> Tel. : +32 (0)2 742 05 94
> GSM : +32 (0)497 44 68 12
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org