I asked something similar to this on jGuru Struts FAQ.

I've done simple validation in a multiframe environment. I implemented the
(simple) validaton in JavaScript for a  form submit from one frame, with
the 'target' attribute set to another frame. If the JavaScript function
(invoked at form submit) detects a validation error, it allows the form
submit to proceed (calling the ActionForm to produce ActionErrors) but
first dynamically changes the form target to '_self' so the error messages
appear in the originating form.

You could also have the target (output) frame receive any ActionErrors in a
JavaScript variable and have it notify the originating frame of any errors
(using onLoad event), without changing the (visible) content of the target
(output frame).

Never done popup windows but I can feel one coming on...

Rob





                                                                                       
                                             
                    Steve Earl                                                         
                                             
                    <stevee@Infoga       To:     "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                
                    in.co.uk>            cc:                                           
                                             
                                         Subject:     Struts and frames...             
                                             
                    29/01/2002                                                         
                                             
                    11:28                                                              
                                             
                    Please respond                                                     
                                             
                    to "Struts                                                         
                                             
                    Users Mailing                                                      
                                             
                    List"                                                              
                                             
                                                                                       
                                             
                                                                                       
                                             




Apologies if this topic has been covered before but I've searched the
archives and am still unclear.

I was wondering if there is an elegant way of having ActionErrors appear in
an input frame (should there be errors within the form) but having the
results of the action (a db lookup for example) appear in a second, output
frame should there be no validation errors.

At present I've managed to get it so that the ActionErrors will appear
within the output frame but really all this is doing is displaying the
input
form (including errors) within the output frame. I stopped it re-displaying
the form itself in this frame by putting a series of <logic> tags around
the
code within the input jsp.

Also, is there any more detailed information on how to configure struts in
a
multi-frame environment. Specifically, my application is going to need to
have pop-up windows which, when closed will return to a multi-frame page.
At
present I can get the new window to appear but closing it does not
redisplay
the original page correctly.

Apologies again if this topic has been done to death

regards

__________________________________
Steve Earl

InfoGain Limited

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





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

Reply via email to