Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Submitting from pop-up window

 
aslam parveez
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement where in once i click on a link in a jsp page i will have to show a form in a popup window. And once i submit the form the pop-up window needs to be closed. I'm able to do the same by using java script function window.open("URL of action for showing the form',window properties). I'm able to submit the form also.
However, my problem is when i have an error situation during my submit then i'll have to display the error message in the parent jsp after closing the pop-up window. I have declaratively handled the exception by giving the parent page as the input but when there is an exception my parent page is not refreshed and error message is not displayed. How do i achieve the same ? Any help will be greatly appreciated.
 
Shane W
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normal handled exceptions can be caught and a message can be set in the request object ( or you can have it in bean ), and this message can be shown on JSP.Modify your parent JSP suitably to show the messages.Ensure that you clear the message evry time in the action to avoid an old message from popping up later.

Hope it helps.

Apple Man
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic