> Another way would be to pass the needed information as
> request parameters
> when you pop the window.  It's a separate request (which is
> probably what's
> causing your initial data-passing problem) so you can send it
> ?parameters=on&the=url.

Do not want to be too paranoid, but you should be sure the data you are
passing as request parameters is not sensitive, nor does it provide an
opportunity for someone to hack into your application. In a sense you
end up publishing/exposing a public interface to your application this
way - which is fine if that's what you want to tod.

You can hide the address and parameters by setting the window properties
something like the following

window.open(destURL,winName,',toolbar=1,location=0,directories=1,status=
1,menuBar=1,scrollBars=1,resizable=1');
where I've set "location=0", there are browser plug-ins that will still
let someone inspect and change the request.

I have struggled with the same problem, none of the solutions are too
elegant:
1) From the first window use "window.open" to open the second window,
issuing a request with all of those request parameters.
2) Submit a request from the first window that saves the data of
interest in the HTTP session. Upon receiving the response, use
Javascript to open the second window, this time with a request URL (very
simple URL, either few or no request parms) to a simple Struts action,
that picks up the data from the HTTP session and displays it in the
second window.
3) Use Javascript to open a second window, then use Javascript to "copy"
data from the first window to the second (not sure if this solves
Angharad's specific problem).

I have recently moved a number of charting pages from the approach #1 to
approach #2. At first I was not thrilled because I ended up increasing
the total number of requests from one to two, but after working through
it I was quite happy. Approach #2 made it easier to build a more
wizard-like, prompted solution - more "user friendly".

Hope this helps.

> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 23, 2004 8:05 AM
> To: Struts Users Mailing List
> Subject: Re: Popups with Struts.
>
>
> From: "Angharad Stapleton" <[EMAIL PROTECTED]>
> > The only way I can think of at the moment is to store
> > information in session, and pass control back to form page with a
> parameter
> > that would tell it to open a pop-up window and get the
> information from
> the
> > session. I'm thinking there is probably an easier way to do this.
>
> Session is probably the easiest way to do it.  If your
> session is getting
> cluttered with a bunch of  Attributes, then consider creating
> a class to
> encapsulate the ones that go together, or at least put them in a Map.
>
> Another way would be to pass the needed information as
> request parameters
> when you pop the window.  It's a separate request (which is
> probably what's
> causing your initial data-passing problem) so you can send it
> ?parameters=on&the=url.
>
> HTH,
> Wendy Smoak
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to