Hi,

i need some advice on how to properly integrate backbone.js in my T5
application.

Adding backbone.js with the @Import annotation results in an console
error because it can't find the global underscore object _. The reason
for that is the mapping of underscore to the T5 namespace in
t5-core.js. When i tried to replace the core javascript stack i
realized that it was already overridden by tapestry5-jquery. My quick
workaround is to add the assets underscore.js and backbone.js manually
using JavascriptSupport; this way i can control the order and _ is
initialized globally again, but underscore is included twice in my
pages.

    void afterRender()
    {
        jsSupport.importJavaScriptLibrary(underscore);
        jsSupport.importJavaScriptLibrary(backbone);
    }

How could i solve this problem differently? Is anyone using T5 with
backbone already? I'd be interested how the view templates are
handled.

g,
Kris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to