Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying a pop up dialog

 
veena sasikumar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have written a class for validating datas and I am calling this method for validating the "from" and "to" date fields of a form(MyFirstForm) in an Action's execute method. I want to
1) display error in the first jsp itself when the validation fails.
2) pop up a dialog with values fetched from data base between the dates if the validation passes.
The first part was done easily by throwing errors and displaying the same.
How can I get a pop up dialog ( say model dialog) when the validation succeeds.

I have written one more jsp which can be used for displaying in the popup window. But how can I get a pop up model dialog?

thanks and regards

veena
 
Mandar Velankar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to me you may write separeate javabean which have some property say msg & getter/setter method to retrive or store value . You can set your
retrive values by setting msg in above javabean. put javabean in request scope e.g request.setAttribute("testBean", testBn);
now on next page which will be displayed write javascript function on onLoad event handler of your form and pass to the function value by using <bean:write> tag which will retrive set value.Display the passed value using alert().
Try it out , it works I tested that.

Regards
Mandar Velankar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic