[ 
https://issues.apache.org/jira/browse/TAP5-1?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649348#action_12649348
 ] 

Inge Solvoll commented on TAP5-1:
---------------------------------

I agree with Thiago, graceful degradation is important and I would like to keep 
the link in the href.

If you have many links on the page that needs zone init, it is very likely that 
the user will click one of them before init is complete. Of course, if I was 
serious about graceful degradation, I should have already provided a non-XHR 
fallback and I wouldn't be barking up the T5-tree :)

Having said that, I would like an elegant solution to enable my XHR-enabled 
clients to avoid this problem. A javascript event telling me that tapestry init 
has finished would be helpful. Thiagos suggestion in the previous post, 
disabling/hiding links with javascript, is probably a good default behaviour. 
After all, in most cases the links will display right away anyway and the user 
won't notice that they were gone.

> Clicking on a link that updates a zone before the page has fully loaded will 
> result in a full page update and, often, a server-side exception
> ---------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-1
>                 URL: https://issues.apache.org/jira/browse/TAP5-1
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.0.15
>            Reporter: Geoff Callender
>            Assignee: Howard M. Lewis Ship
>             Fix For: 5.0.16
>
>
> 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 [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.
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to