• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

modal dialog in struts

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic