Two Laptop Bag
The moose likes Servlets and the fly likes Losing Form on Spawning Itself Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Losing Form on Spawning Itself" Watch "Losing Form on Spawning Itself" New topic

Losing Form on Spawning Itself


Joined: Apr 15, 2004
Posts: 20
Here's an issue that I'm sure people have already asked on this board...

I am running STRUTS. In my JSP code, I launch a link to the SAME JSP as a popup. In other words, the same form bean is used in the spawned page. The problem is that after the spawned window is closed, the information in the PARENT form is LOST. Any suggestions???

The parent launches the popup directly from the JSP via JScript or HTML.

Yahoo ID: XEngr4Fed<br />SCJP, SCEA
Shailesh Kini
Ranch Hand

Joined: Oct 17, 2001
Posts: 153
Whatz the scope of the bean?


Shailesh Kini.
Pedro Penna
Ranch Hand

Joined: Jun 05, 2004
Posts: 46
Check if this form is being stored in the session, according to the action tag's "scope" attribute.

Second, make sure the parent window's form is submitted, or else the data you see in its form is in the client-side, not in the server-side!

If you don't submit (or can't submit) the parent window's form, you'll have to fill the popup form with JavaScript.

Joined: Apr 15, 2004
Posts: 20
Thanks for the reply. I'm sorry I have not gotten back to you quickly. Anyway, I am working on your suggestion. However, I am having trouble switching out the form bean with the original form bean saved in the session. Any suggestions?
I agree. Here's the link:
subject: Losing Form on Spawning Itself
It's not a secret anymore!