I'm trying to render a block instead of the page when using an ajax call.
This way, I can have a low-bandwidth and a high-bandwith (AJAX enabled
site).
@Inject
@Property
private Block _content;
@OnEvent("activate")
Object activate()
{
if (req.isXHR())
return _content
Object page = validateUserSession();
retrieveMailSetting();
return page;
}
However, when I make the ajax call, i get the following error;
A component event handler
method returned the value Block[content within mail/Compose, at
context:mail/Compose.tml, line 2, column
25]. 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.
Any suggestions?
--
View this message in context:
http://www.nabble.com/Using-OnEvent%28%22activate%22%29-to-render-block-tp21307640p21307640.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]