Justin,

Struts does not keep track of the last page. There is no page concept, only 
URLs. If you need absolute control of what to do when validation fails, this is 
when you begin writing custom code. Instead of using automatic validation, turn 
it off and write code in your Action to invoke the validation manually. If 
hasErrors returns true, you can then determine what forward to return to.

Paul

Justin Chin <[EMAIL PROTECTED]> wrote: Hi all,

 

I am using Tiles and having some issues with my struts config file.
Here is what I am trying to do:

 

Lets say I have two sets of users. UsersA, and UsersB.  The data gather
for both users are the same.  The look and feel is different.  So I want
to point to the same action mapping for the two sets.  The problem comes
into play on validation.  Lets say I fail validation.  Well I need to
return to the page for data reentry.  But I cannot rely on the input
field in my action mapping (as you could when you has 1 jsp to one
action mapping... aka before my intro to tiles) because I could have
come from two different places.  I am not sure why, but I would think
the underlying struts controller would keep track of the page just
navigated from and be able to return to that same page if validation
fails.  (Why is that even a configurable field?)  Any ideas?

 

Thanks,

Justin



                
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

Reply via email to