File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

modal dialog in struts

 
partha chaudhuri
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my STRUT application i have a jsp page (abc.jsp) which shows the summary of a category of product.
I am opening a second jsp (xyz.jsp) by window.showModalDialog which shows product details.
In the xyz.jsp if i add something and submit, it is opening up a new window.
But my application requires that after submit, we can get back to the modal window( here xyz.jsp)

How can i do this?
Thanks,
Partha
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My recommendation is to use window.open() instead. See this thread for a more extensive discussion of this topic.
[ May 25, 2006: Message edited by: Merrill Higginson ]
 
partha chaudhuri
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But when I am using window.open(), in the new open window I lost the seesion, as well as I need that this window will be always top.
Thanks,
Partha
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Partha,

I use window.open() extensively in my applications, and it never causes the user to lose a session. In this case, I'm writing only for Microsoft Internet Explorer with no other browsers supported, and using WebSphere V 5.1 as an application server. I'd be interested to know what environment you're using that causes you to lose a session when you pop up a window using window.open().

I understand the desire to have the popup window always on top, but I haven't had a big problem with my users hiding the window or ignoring it and working on the main window.

The main problem with using a modal dialog is the one you're encountering: When you submit the form, it will not go back to the same window, but open up a new one. The only way around this seems to be to use Dom Lassy's suggestion in the other thread (see the link in my previous post), which is to use an <IFRAME> inside your modal dialog, and specify the name of the iframe as the target of the form action.
 
Mani Venkata Kanth
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

But using window.open() opens a new browser.. if parent window is closed it wont be closed, which will create issue.

is it not possible with modal window??

Thanks in advance
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I prefer to use JavaScript dialogs over browser window dialogs. Have a look at the JQuery Struts2 Plugin's Dialog Tag.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic