What's you environment, including exact version of Tapestry?
On Thu, Nov 14, 2013 at 1:26 PM, Eugen <eugens...@gmail.com> wrote: > Good day, > when I try to require the bootstrap/popover Module I become an error > in Firefox console: > > [22:05:14.435] "RequireJS error: scripterror: Script error for: > bootstrap/popover > http://requirejs.org/docs/errors.html#scripterror, modules > bootstrap/popover" > > the tml file: > <p><t:eventlink id="complete" event="complete" title="tooltip" > class="btn" data-content="Content">Complete»</t:eventlink></p> > > the java call failed: > void afterRender(){ > > javaScriptSupport.require("test").invoke("PopOver").with("complete"); > } > > this call works fine: > void afterRender(){ > > javaScriptSupport.require("test").invoke("ToolTip").with("complete"); > } > > the wrapper for ToolTip and PopoOver test.js module: > (function() { > define ("test", ["jquery", "t5/core/console", "require"] , > function( $, console, require) { > var ToolTip, PopOver, exports; > > ToolTip = function(elementId, params) { > require(["bootstrap/tooltip"], function(){ > var element = $("#"+elementId); > if (!element) { > console.error("Element "+elementId+" not found"); > return; > } > if (params) > element.tooltip(params); > else > element.tooltip(); > }); > }; > > PopOver = function(elementId, params) { > require(["bootstrap/popover"], function(){ > var element = $("#"+elementId); > if (!element) { > console.error("Element "+elementId+" not found"); > return; > } > if (params) > element.popover(params); > else > element.popover('show'); > }); > } > > return exports = { > ToolTip : ToolTip, > PopOver: PopOver > }; > }); > > }).call(this); > > If the PopOver module is contributed manually in Appmodule all works > fine (the module name should be other name that popover!): > @Contribute(ModuleManager.class) > public static void setupBaseModules(MappedConfiguration<String, > Object> configuration, > @Path("${" + > SymbolConstants.BOOTSTRAP_ROOT + "}/js/popover.js") > Resource popover) > { > configuration.add("bootstrap/popovers", new > JavaScriptModuleConfiguration(popover).dependsOn("bootstrap/tooltip")); > } > > Is something wrong in my code or it is a Jira issue? > > Thanks > Eugen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com