On Sat, 09 Apr 2016 09:05:17 -0300, Ilya Obshadko <xf...@xfyre.com> wrote:

Facebook recommends the following method to integrate FB SDK using AMD
approach:
https://developers.facebook.com/docs/javascript/howto/requirejs/v2.5

However I can't find any obvious way to configure RequireJS paths in
Tapestry.

Is there any way to do it?

Yes. See JavaScriptSupport.addModuleConfigurationCallback(ModuleConfigurationCallback): http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/javascript/JavaScriptSupport.html#addModuleConfigurationCallback(org.apache.tapestry5.services.javascript.ModuleConfigurationCallback)

ModuleConfigurationCallback has a single method, JSONObject configure(JSONObject configuration), which receives the Require.js configuration as a JSONObject file so you can modify it to your needs and return it. There's an example in the Tapestry's test webapps.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to