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.

Adam

On 01/14/2004 06:52 PM 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 BuildModelForm.java, 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("errors.date.required"));
}


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian

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



Reply via email to