You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/09/11 02:00:44 UTC

[jira] Commented: (TAPESTRY-2648) AJAX ActionLink exception if clicked as page loads

    [ https://issues.apache.org/jira/browse/TAPESTRY-2648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630041#action_12630041 ] 

Howard M. Lewis Ship commented on TAPESTRY-2648:
------------------------------------------------

I can't help but wonder if this is not a wide problem than just Tapestry; any application that uses Prototype and defers (as is strongly suggested) linking event handlers until the dom:loaded event may be subject to this.

What would be necessary to fully address this would be to use different actions for traditional requests vs. Ajax requests, so that a traditional request can be identified in the Ajax pipeline and ... what?  Ignored?  That wouldn't work either, you'd see a blank page after clicking what looked like an Ajax link.

> AJAX ActionLink exception if clicked as page loads
> --------------------------------------------------
>
>                 Key: TAPESTRY-2648
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2648
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.14
>            Reporter: Geoff Callender
>
> I have a page with 2 ActionLinks - the first link updates the whole page; the second link specifies a zone. 
> If you click on the two links in quick succession then an exception is thrown.  Alternatively, just Reload the page and click on the second link before the page has finished reloading and you'll get the same exception.
> Here's the page, with source: http://202.177.217.122:8080/jumpstart/examples/javascript/ajax
> Here's the exception:
> A component event handler method returned the value org.apache.tapestry5.internal.structure.BlockImpl@80937b. 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.
> I understand that Tapestry doesn't hook up zones etc. until the DOM is loaded. It's also been suggested to "check Request#isXhr in your event handler to see if it's an AJAX request - if it's not you can't return a Block, so you'll have to figure out another way to do what needs to be done."
> However, since this symptom will afflict every AJAX ActionLink out-of-the-box, it would be nice if the framework handled it so we don't have to code around it.
> Geoff

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org