RE: Form validation before pop-up window openning

2001-12-12 Thread Sobkowski, Andrej

Xavier,

I would probably handle it in multiple steps (veeery personal opinion):
- "save" calls the Action that performs the validation
- if the validation fails, return the same page with errors on top (for
example) without opening the pop-up
- if the validation succeeds, you can return the same page but also generate
a  to open the pop-up window via Javascript.

In order to call the form.validate(mapping, request) method you need the
ActionMapping that is stored on the ActionServlet (to which you have no
reference - I hope, at least! :)). And that's probably a good thing: the
validation is performed on the ActionForm during the ActionServlet
processing and should not be moved too much to the presentation layer.

But it's only my point of view...

HTH

Andrej

> -Original Message-
> From: Xavier Brunel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 12, 2001 3:18 AM
> To: 'Struts-User
> Subject: Form validation before pop-up window openning
> 
> 
> Hi,
> 
> I have a form with several buttons in it, one of them is a 
> "save" button,
> that opens a pop-up window where you fill the name under 
> which you want to
> save the informations you filled in the opener form.
> 
> My problem is that I would like to validate the opener window before
> openning
> the pop-up window, using the validate(mapping,request) method of my
> ActionForm.
> Do you know a way to do so ?? Is it possible to call struts 
> methods in the
> javascript script
> that open the pup-up window ??
> If I use the same action and actionform for the opener form 
> and the pop-up
> form, can I validate the openner before openning the pop-up form 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 



RE: Form validation before pop-up window openning

2001-12-12 Thread Alexander Jesse

Hi,

assuming you use validation as done by David's extensions (-> validation.xml,...)
you could change the Javascript-stuff in the validation.xml file
to call the pop-up-window...

hope this helps
Alexander Jesse

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 12, 2001 9:18 AM
To: [EMAIL PROTECTED]
Subject: Form validation before pop-up window openning


Hi,

I have a form with several buttons in it, one of them is a "save" button,
that opens a pop-up window where you fill the name under which you want to
save the informations you filled in the opener form.

My problem is that I would like to validate the opener window before
openning
the pop-up window, using the validate(mapping,request) method of my
ActionForm.
Do you know a way to do so ?? Is it possible to call struts methods in the
javascript script
that open the pup-up window ??
If I use the same action and actionform for the opener form and the pop-up
form, can I validate the openner before openning the pop-up form 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: