struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Saul Q Yuan" <y...@dataanvil.com>
Subject RE: messages/errors 2 form's 1 page
Date Wed, 04 Feb 2004 15:43:30 GMT
Do the two action mappings share the same form bean? If yes, that might
be the problem. Try to use two separate form beans, see how it goes.


Saul



-----Original Message-----
From: Mark Lowe [mailto:mark.lowe@talk21.com] 
Sent: Wednesday, February 04, 2004 8:52 AM
To: Struts Users Mailing List
Subject: messages/errors 2 form's 1 page


Hello

I'm sure this has been answered before but I'm sick of googling for the 
answer.

Using tiles I've 2 forms in one page.

<tiles:insert page="loginForm.jsp" />

<tile:insert page="customerForm.jsp" />

Now both forms have some properties with the same names e.g.

<html:form action="/login.do">
	<html:text property="email" />
	<html:errors property="email" />
..
<html:form action=/register.do">
	<html:text property="email" />
	<html:errors property="email" />

When i submit either form the errors are displayed in both forms. The 
only solution I can think of is to extend TileAction and validate in 
there, but I usuall just use tiles defs as forwards and don't bother 
with TileAction.

Do i go down the TileAction route or something else?

Cheers Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message