struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albuquerque, Ronald" <>
Subject Validation, javaScript & modal windows
Date Mon, 28 Oct 2002 13:53:56 GMT

I'm working on a project that has a lot of existing static HTML; this will serve as the
basis for the JSP's for the J2EE application.

I've come across a situation in the HTML and I'd like to please ask your help.

Existing Flow (in static HTML pages):
1. End-User sees information page on a particular account. There is also a Change link.
2. If user clicks this Change link, javascript is called that brings up another HTML
    file (change account page) in a browser modal window. The user can edit 
    information on the account, and then click 'Save' or 'Cancel'.

I have converted this to Struts and JSP's. 
1. Information page and change account page, converted to JSP's. use a form bean.
2. The existing javaScript is still called to pop up the modal window displaying the 
    change account page.

I want to use the Struts Validator on the change account page. When the user
clicks Save, it should send a request to the server. The form bean extends 
ValidatorForm. So  -> the validation will either be successful or not.
If not successful:  user will be returned to the same modal popup window, with 
validation errors displayed. If successful, popup window disappears, account 
info page is updated.

The problem I'm seeing right now is in the case where the validation is unsuccessful.
Using server-side validation techniques, how can I get Struts to return to the 
javascript modal popup window ?

(Only way I can do so right now is by turning on client-side validation, so if the user 
can submit successfully, then it implies all validation has passed).

Your help is really appreciated.

Thanks so much.

Ronald Albuquerque.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message