File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Displaying a pop up dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Displaying a pop up dialog " Watch "Displaying a pop up dialog " New topic
Author

Displaying a pop up dialog

veena sasikumar
Greenhorn

Joined: Nov 27, 2006
Posts: 29
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

Joined: Jul 31, 2006
Posts: 32
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying a pop up dialog