Hi,

So the documentation here
http://tapestry.apache.org/tapestry5/guide/ajax.html says:-

 


"Event Handler Return Types


In a traditional request, the return value of an event handler method is
used to determine which page will render a complete response, and a
redirect is sent to the client to render the new page (as a new
request).

With a Zone update, the return value is used to render a partial
response within the same request.

This return value should be an injected component or block. The value
will be rendered, and that markup will be used on the client side to
update the Zone's <div>.

An event handler may return a Link
<http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/Link.
html>  and the client will be redirected to that link.

Returning a page name (as a String), or a page class, or a page instance
will also send a redirect to the indicated page.

"

 

But my method that returns a Link says throws this exception

 

Caused by: java.lang.RuntimeException: A component event handler method
returned the value http://localhost:8080/home/ Return type
org.apache.tapestry5.internal.services.LinkImpl can not be handled.
Configured return types are org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.json.JSONArray,
org.apache.tapestry5.json.JSONObject,
org.apache.tapestry5.runtime.Component,
org.apache.tapestry5.runtime.RenderCommand.

      

 

The documentation and the exception seem to be mutually exclusive, or is
there a 3rd way I am missing? Any ideas appreciated as it has been a
pretty unedifying afternoon of head against T5 brick walling.

 

Cheers

 

Russell

Reply via email to