Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with form submission with spring mvc

 
Adam Mazurek
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I've got BIG problem with spring portlet mvc on jboss portal: supose I am on page /portal/portal/myPortal/somePage and on this page are a few windows (with forms - derived from SimpleFormController). When I submit one of them - OK, the success view is displayed, but when I go to another page and go back to somePage the form is submitted (bo by back in my web browser, but by some link to that page)!!! The errors, if are any, are displayed and often i get exception: could'n retrieve command (errors) object from portlet session. Why is that? Setting session form to true/false doesn't change this. I think that setting parameters about form submission in portlet session is one big mistake. I hope someone will tell mi what it is that way and what can I do to make my work better. What can I do take control over form submitting? What is the parameter name? Where can I set it??

Adam

OT:
Spring (IoC) is good, but my experience with mvc tell that spring mvc isn't , I hope JSF will satisfy my needs.
 
Ramakrishna Reddy Ambati
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Your problem is not clear,from my understanding I am suggesting you that better to use sessions for this type of problems.The intial value of the session variable must be false(form not submitted).While submitting the form check for the session variable if it is false then submit it and make the session variable as true(form submitted) otherwise dont submit that.Now even if you come back ,it will check for the session variable obiviously it is true i.e,form was submitted hence the new submission will fail.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic