struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: Struts and iframes
Date Thu, 15 Jan 2004 13:34:10 GMT
If you're going to use a form in one frame to submit to another frame, 
then you should expect that!

You could set the action mapping 'input' parameter to an error page 
instead of the form itself. That way, the 2nd frame will display an 
error message instead of a form.


On 01/14/2004 06:52 PM&nbsp;Vinicius Carvalho wrote:
> Hi there! In our project, at a certain point, we have a table with a 
> form in a td, which target is a iframe, code looks like this:
> <html:form action="/buildModel" target="main">
> Well, it works fine, almost! The action forwards to the viewModel.jsp, 
> which is rendered in the main window. The problem is, when an error is 
> captured by the validate() method of the, it returns 
> to the page with the forms, but now in the wrong window. So I end up 
> with 2 forms in my window. Is it possible to solve this? I don't know, 
> maybe by changing the target attribute of the request(response??) when 
> an error occurs.
> And, BTW, In that jsp, I use this:
> <html:errrors property:"date">
> In my BuildModelForm, inside the validate model, I have something like 
> this:
> if(getDate().length() < 1 || getDate() == null){
>         errors.add("date",new ActionError(""));
> }
> and although I have configured the resources bundle, no message is 
> displayed, when user lefts it blank (even though it is displayed in the 
> wrong window).
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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

View raw message