struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Mikheev <mi...@bigfoot.com>
Subject Re: 2 jsp files using the same form
Date Tue, 28 Aug 2007 20:53:17 GMT
Anna Simbirtsev wrote:
> Hello
> I have 2 screens that use the same form. The form class has a validate
> function. To distinguish which screen(jsp file) is using the form I do the
> following in jsp files:
> 
> <% session.setAttribute("page", "add") %>
> <% session.setAttribute("page", "add_2") %>
> 
> Then in the form class I grab that value and figure out what values to
> validate.
> Is it a good way to do it?


You should distinguish between two forms by passing different
values of submit buttons (in my opinion)

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


Mime
View raw message