Author Login
Post Reply
I've created AjaxLoader mixin that I use on EventLink with zone param. It
will add nice animated gif inside zone while zone content will be loading.
JS part creates Tapestry.AjaxLoader class.
I've also added Tapestry.Initializer.ajaxLoader with (linkId, zoneId,
loaderURL) params which will simply create new TapestryAjaxLoader inside.
So the question is: I don't want to pass 'loaderURL' param in every init
request. I can introduce "static" member with Tapestry.AjaxLoader.loaderURL
= '/images/...../loader.gif'. But where should I put that initializer ? If I
put it like this:
@AfterRender
void afterRender(MarkupWriter markupWriter) {
renderSupport.addScript("Tapestry.AjaxLoader.loaderURL = '%s';",
ajaxLoader.toClientURL());
renderSupport.addInit("ajaxLoader", link.getClientId(), zoneId);
}
I end up with as many "Tapestry.AjaxLoader.loaderURL='...'" as I have
eventLinks and zones in my page, but I want to have just one.
Can you suggest some nice solution to my problem ?
--
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)