Re: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-08 Thread Peter Stavrinides
Ironic that you are pointed to yahoo for a solution when the advice they 
advocated to the community is to load scripts after markup, all for the false 
hope of a performance increase, which is ultimately incorrect and is creating 
these types of problems... your markup (hence actionlinks etc) should never be 
allowed to render until the scripts have loaded and the DOM is available.

See http://www.quirksmode.org/js/placejs.html at the bottom of the page:

Quote: Placing scripts in the head makes sure that any functions are loaded 
before the buttons, links or other things that call them are loaded. If you put 
your scripts at the very end of a page, it is possible that a user already sees 
part of the page including a button with a JavaScript function call, while the 
rest of the page hasn't loaded yet. Result: user pushes button and gets 
JavaScript Error Message Alerts, because the browser can't find the script 
(yet). Unless there's a good reason to do otherwise, place your scripts in the 
head

Fortunately this is now configurable in Tapestry.

public static void contributeApplicationDefaults(
MappedConfigurationString, String configuration) {
configuration.add(SymbolConstants.SCRIPTS_AT_TOP, true);
}


And I bet your problem goes away.
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: Ben Gidley [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Saturday, 6 December, 2008 12:50:53 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: T5: Clicking on actionLonk with a zone parameter before page loads

Russell,
I you look at YUI's event model I belive it handles this better.

YUI Event - http://developer.yahoo.com/yui/event/ will allow you define
events before DOM Ready and queues them until after.

This should be a good way to solve this problem.

Ben

On Fri, Dec 5, 2008 at 4:42 PM, Russell Brown [EMAIL PROTECTED]wrote:

 Is Ok. I read the results at
 https://issues.apache.org/jira/browse/TAP5-1. I guess we will have to
 roll our own. Can't have users clicking once and waiting and then going
 uh...did I click that... I think it is better if there is either some
 feedback or a way of trapping the event and replaying it when the page
 has loaded.

 Cheers
 Russell

 -Original Message-
 From: Russell Brown [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:59
 To: Tapestry users
 Subject: RE: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Can you tell me what happens now? Is the link just dead until the page
 loads, is there some sort of feed back? Is It invisible? Just want to
 know as we were about to roll our own solution.

 Many thanks

 Russell

 -Original Message-
 From: Inge Solvoll [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:52
 To: Tapestry users
 Subject: Re: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Last version of T5 has a fix for this. Works for me now.

 On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
 [EMAIL PROTECTED]wrote:

  Hi,
 
  I have some AJAX calls from actionLinks. If a user clicks on the
  actionLink before the page is fully loaded I get the exception
 
 
 
  A component event handler method returned the value
  [EMAIL PROTECTED] Return type
  org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
  Configured return types are java.lang.Class, java.lang.String,
  java.net.URL, org.apache.tapestry5.Link,
  org.apache.tapestry5.StreamResponse,
  org.apache.tapestry5.runtime.Component.
 
 
 
 
 
  Is this something to do with javascript setting up the zones on load?
 
 
 
  Is there a work around or a planned fix for this? We use ajax calls
 all
  over the site and everyone can cause this kind of explosion if we have
 a
  fast clicker.
 
 
 
  Cheers
 
 
 
  Russell
 
 

 -
 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]



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



RE: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-08 Thread Russell Brown
Hi Peter,
Thanks for that. To try it I guess I have to upgrade to 5.0.17 ?

Cheers

Russell
-Original Message-
From: Peter Stavrinides [mailto:[EMAIL PROTECTED] 
Sent: 08 December 2008 15:01
To: Tapestry users
Subject: Re: T5: Clicking on actionLonk with a zone parameter before page loads

Ironic that you are pointed to yahoo for a solution when the advice they 
advocated to the community is to load scripts after markup, all for the false 
hope of a performance increase, which is ultimately incorrect and is creating 
these types of problems... your markup (hence actionlinks etc) should never be 
allowed to render until the scripts have loaded and the DOM is available.

See http://www.quirksmode.org/js/placejs.html at the bottom of the page:

Quote: Placing scripts in the head makes sure that any functions are loaded 
before the buttons, links or other things that call them are loaded. If you put 
your scripts at the very end of a page, it is possible that a user already sees 
part of the page including a button with a JavaScript function call, while the 
rest of the page hasn't loaded yet. Result: user pushes button and gets 
JavaScript Error Message Alerts, because the browser can't find the script 
(yet). Unless there's a good reason to do otherwise, place your scripts in the 
head

Fortunately this is now configurable in Tapestry.

public static void contributeApplicationDefaults(
MappedConfigurationString, String configuration) {
configuration.add(SymbolConstants.SCRIPTS_AT_TOP, true);
}


And I bet your problem goes away.
Peter

-- 
If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Please visit http://www.albourne.com/email.html for important 
additional terms relating to this e-mail.

- Original Message -
From: Ben Gidley [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Saturday, 6 December, 2008 12:50:53 PM GMT +02:00 Athens, Beirut, 
Bucharest, Istanbul
Subject: Re: T5: Clicking on actionLonk with a zone parameter before page loads

Russell,
I you look at YUI's event model I belive it handles this better.

YUI Event - http://developer.yahoo.com/yui/event/ will allow you define
events before DOM Ready and queues them until after.

This should be a good way to solve this problem.

Ben

On Fri, Dec 5, 2008 at 4:42 PM, Russell Brown [EMAIL PROTECTED]wrote:

 Is Ok. I read the results at
 https://issues.apache.org/jira/browse/TAP5-1. I guess we will have to
 roll our own. Can't have users clicking once and waiting and then going
 uh...did I click that... I think it is better if there is either some
 feedback or a way of trapping the event and replaying it when the page
 has loaded.

 Cheers
 Russell

 -Original Message-
 From: Russell Brown [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:59
 To: Tapestry users
 Subject: RE: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Can you tell me what happens now? Is the link just dead until the page
 loads, is there some sort of feed back? Is It invisible? Just want to
 know as we were about to roll our own solution.

 Many thanks

 Russell

 -Original Message-
 From: Inge Solvoll [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:52
 To: Tapestry users
 Subject: Re: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Last version of T5 has a fix for this. Works for me now.

 On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
 [EMAIL PROTECTED]wrote:

  Hi,
 
  I have some AJAX calls from actionLinks. If a user clicks on the
  actionLink before the page is fully loaded I get the exception
 
 
 
  A component event handler method returned the value
  [EMAIL PROTECTED] Return type
  org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
  Configured return types are java.lang.Class, java.lang.String,
  java.net.URL, org.apache.tapestry5.Link,
  org.apache.tapestry5.StreamResponse,
  org.apache.tapestry5.runtime.Component.
 
 
 
 
 
  Is this something to do with javascript setting up the zones on load?
 
 
 
  Is there a work around or a planned fix for this? We use ajax calls
 all
  over the site and everyone can cause this kind of explosion if we have
 a
  fast clicker.
 
 
 
  Cheers
 
 
 
  Russell
 
 

 -
 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]



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



Re: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-06 Thread Ben Gidley
Russell,
I you look at YUI's event model I belive it handles this better.

YUI Event - http://developer.yahoo.com/yui/event/ will allow you define
events before DOM Ready and queues them until after.

This should be a good way to solve this problem.

Ben

On Fri, Dec 5, 2008 at 4:42 PM, Russell Brown [EMAIL PROTECTED]wrote:

 Is Ok. I read the results at
 https://issues.apache.org/jira/browse/TAP5-1. I guess we will have to
 roll our own. Can't have users clicking once and waiting and then going
 uh...did I click that... I think it is better if there is either some
 feedback or a way of trapping the event and replaying it when the page
 has loaded.

 Cheers
 Russell

 -Original Message-
 From: Russell Brown [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:59
 To: Tapestry users
 Subject: RE: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Can you tell me what happens now? Is the link just dead until the page
 loads, is there some sort of feed back? Is It invisible? Just want to
 know as we were about to roll our own solution.

 Many thanks

 Russell

 -Original Message-
 From: Inge Solvoll [mailto:[EMAIL PROTECTED]
 Sent: 05 December 2008 14:52
 To: Tapestry users
 Subject: Re: T5: Clicking on actionLonk with a zone parameter before
 page loads

 Last version of T5 has a fix for this. Works for me now.

 On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
 [EMAIL PROTECTED]wrote:

  Hi,
 
  I have some AJAX calls from actionLinks. If a user clicks on the
  actionLink before the page is fully loaded I get the exception
 
 
 
  A component event handler method returned the value
  [EMAIL PROTECTED] Return type
  org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
  Configured return types are java.lang.Class, java.lang.String,
  java.net.URL, org.apache.tapestry5.Link,
  org.apache.tapestry5.StreamResponse,
  org.apache.tapestry5.runtime.Component.
 
 
 
 
 
  Is this something to do with javascript setting up the zones on load?
 
 
 
  Is there a work around or a planned fix for this? We use ajax calls
 all
  over the site and everyone can cause this kind of explosion if we have
 a
  fast clicker.
 
 
 
  Cheers
 
 
 
  Russell
 
 

 -
 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]




T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-05 Thread Russell Brown
Hi,

I have some AJAX calls from actionLinks. If a user clicks on the
actionLink before the page is fully loaded I get the exception  

 

A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String,
java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.

 

 

Is this something to do with javascript setting up the zones on load?

 

Is there a work around or a planned fix for this? We use ajax calls all
over the site and everyone can cause this kind of explosion if we have a
fast clicker.

 

Cheers

 

Russell



RE: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-05 Thread Russell Brown
Can you tell me what happens now? Is the link just dead until the page
loads, is there some sort of feed back? Is It invisible? Just want to
know as we were about to roll our own solution.

Many thanks

Russell

-Original Message-
From: Inge Solvoll [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2008 14:52
To: Tapestry users
Subject: Re: T5: Clicking on actionLonk with a zone parameter before
page loads

Last version of T5 has a fix for this. Works for me now.

On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
[EMAIL PROTECTED]wrote:

 Hi,

 I have some AJAX calls from actionLinks. If a user clicks on the
 actionLink before the page is fully loaded I get the exception



 A component event handler method returned the value
 [EMAIL PROTECTED] Return type
 org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
 Configured return types are java.lang.Class, java.lang.String,
 java.net.URL, org.apache.tapestry5.Link,
 org.apache.tapestry5.StreamResponse,
 org.apache.tapestry5.runtime.Component.





 Is this something to do with javascript setting up the zones on load?



 Is there a work around or a planned fix for this? We use ajax calls
all
 over the site and everyone can cause this kind of explosion if we have
a
 fast clicker.



 Cheers



 Russell



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



RE: T5: Clicking on actionLonk with a zone parameter before page loads

2008-12-05 Thread Russell Brown
Is Ok. I read the results at
https://issues.apache.org/jira/browse/TAP5-1. I guess we will have to
roll our own. Can't have users clicking once and waiting and then going
uh...did I click that... I think it is better if there is either some
feedback or a way of trapping the event and replaying it when the page
has loaded.

Cheers
Russell

-Original Message-
From: Russell Brown [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2008 14:59
To: Tapestry users
Subject: RE: T5: Clicking on actionLonk with a zone parameter before
page loads

Can you tell me what happens now? Is the link just dead until the page
loads, is there some sort of feed back? Is It invisible? Just want to
know as we were about to roll our own solution.

Many thanks

Russell

-Original Message-
From: Inge Solvoll [mailto:[EMAIL PROTECTED] 
Sent: 05 December 2008 14:52
To: Tapestry users
Subject: Re: T5: Clicking on actionLonk with a zone parameter before
page loads

Last version of T5 has a fix for this. Works for me now.

On Fri, Dec 5, 2008 at 3:50 PM, Russell Brown
[EMAIL PROTECTED]wrote:

 Hi,

 I have some AJAX calls from actionLinks. If a user clicks on the
 actionLink before the page is fully loaded I get the exception



 A component event handler method returned the value
 [EMAIL PROTECTED] Return type
 org.apache.tapestry5.internal.structure.BlockImpl can not be handled.
 Configured return types are java.lang.Class, java.lang.String,
 java.net.URL, org.apache.tapestry5.Link,
 org.apache.tapestry5.StreamResponse,
 org.apache.tapestry5.runtime.Component.





 Is this something to do with javascript setting up the zones on load?



 Is there a work around or a planned fix for this? We use ajax calls
all
 over the site and everyone can cause this kind of explosion if we have
a
 fast clicker.



 Cheers



 Russell



-
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]