There is also the bug in MSIE that if there is a malformed tag like <a href="whoops> it can cause the whole page be fetched twice my MSIE, and sometimes the same thing happens with Firefox.

Unlikely this is your problem, but just a thought.

Regards
Thomas

On 07/03/2008, at 6:07 AM, Chuck Hill wrote:

Are you downloading it with IE? IIRC, IE makes two requests for anything it needs a plugin for or displays in an external application.

Chuck


On Mar 6, 2008, at 2:41 AM, Gino Pacitti wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank Chuck for your time...

It seems to happen only when the PDF is being sent as a download as
part of appendToResponse... Even in the Apple Example for File
Downloads there is a repeat so I modified what I was doing and just
created the PDF, wrote it to the file system and then offered a link
to the file for download.

Again thanks for your input.

Gino
On 5 Mar 2008, at 17:45, Chuck Hill wrote:


On Mar 5, 2008, at 9:37 AM, Gino Pacitti wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks Chuck

Is that a default action that WO does - syncronize bindings... ?

Yes.

Causing multiple times... If I remove the appendToResponse PDF
download code it only shows a single call?

The easiest thing to do is to add a log message like this:

NSLog.out.appendln(new RuntimeException("Code Called from here"));

to your method so you can get a stack trace of the code that is
calling it.


Chuck


On 5 Mar 2008, at 17:33, Chuck Hill wrote:

Do these components synchronize their bindings? If you have a
hyperlink with
action = downloadPDF;

The downloadPDF() will get called multiple times by binding
synchronization.

Chuck


On Mar 5, 2008, at 5:59 AM, Gino Pacitti wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All

I have a component actton method that is calling a second component (not nested) and the result is the action method being called twice
in the first component and also appendToResponse twice....

*******************************************************************
**
***
*************
 public AttractionVoucher downloadPDF()
 {

    System.out.println("GOING TO START  " );
      AttractionVoucher nextPage = (AttractionVoucher)
pageWithName
("AttractionVoucher");

     return nextPage;

 }
*******************************************************************
**
***
******************************

If the next page, AttractionVoucher, I am overriding
appendToResponse  with this:

*******************************************************************
**
***
******************************
     public void appendToResponse(WOResponse r, WOContext c){


 r.disableClientCaching();
 r.removeHeadersForKey("Cache-Control");
 r.removeHeadersForKey("pragma");
 r.setHeader(mimeType, "content-type");
     if (fileName != null) {
                        r.setHeader("inline;attachment;filename=\"" + fileName + 
"\"",
"content-disposition");
                }
try{
     NSData fileToDownload = new NSData(new File
(pdfpathfordownload));
     r.setHeader(Integer.toString(fileToDownload.length()),
"content-length");
     r.setContent(fileToDownload);

   }catch (Exception e) {
      e.printStackTrace();
  }
System.out.println("These are the headers " + r.headers());


  }
*******************************************************************
**
***
******************************


Although the PDF is appearing it seems to call downloadPDF twice?

Has anyone an explanation or link to find out why this is
happening....

This is Tiger 5.3 WO and safari...

GIno

-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.7.0 (Build 1012)
Charset: US-ASCII

wj8DBQFHzqdFTKoUwFtLxjwRAprPAKCHVJQU5D1XmJCx48hOopJ6Jgm6XwCeN6IO
AlRpFhXARtx4kuXSHR/sbVI=
=81uX
-----END PGP SIGNATURE-----
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chill%
40global-village.net

This email sent to [EMAIL PROTECTED]


--

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects







-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.7.0 (Build 1012)
Charset: US-ASCII

wj8DBQFHztpaTKoUwFtLxjwRAiSJAJ0TtOtt0QGY+V8AuTBx5KGz6g9AOgCgldsV
u/S5LArZIUKWboubPJKOLnw=
=x6nG
-----END PGP SIGNATURE-----


--

Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects







-----BEGIN PGP SIGNATURE-----
Version: PGP Desktop 9.7.0 (Build 1012)
Charset: US-ASCII

wj8DBQFHz8piTKoUwFtLxjwRAiq1AJ0UxzOzL4OoSz+IyJNR8ajvnJ4T5wCfQC8I
aek2pYidVs9PCKB/bBB1EMI=
=H5eG
-----END PGP SIGNATURE-----


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40woomeranet.com.au

This email sent to [EMAIL PROTECTED]


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to