Start by getting the jquery infrastructure working. Verify that your module is being loaded etc.
On Tue, May 27, 2014 at 11:08 AM, Ilya Obshadko <ilya.obsha...@gmail.com>wrote: > Here's my version of contributeApplicationDefaults(): > > public static void contributeApplicationDefaults ( > MappedConfiguration<String, Object> configuration ) { > > configuration.add ( SymbolConstants. > JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery" ); > > configuration.add ( SymbolConstants.SUPPORTED_LOCALES, "en,ru" ); > > configuration.add ( SymbolConstants.COOKIE_MAX_AGE, "30d" ); > > } > > Looks very similar to yours. I have tried to add annotations like those in > your message (although I'm pretty sure that's not needed, because > contribution was working without it): > > @Contribute(SymbolProvider.class) @ApplicationDefaults > > Still got the same results. > > > > On Tue, May 27, 2014 at 12:05 PM, Chris Poulsen <mailingl...@nesluop.dk > >wrote: > > > Hi, > > > > The dom module is the one distinguishing between jquery and prototype. > > > > The code you posted belongs in the prototype version, the jquery one is > > different... > > > > So it seems that you are not using the jquery infrastructure. > > > > We use the following setting to enable it: > > > > @Contribute( SymbolProvider.class ) > > @ApplicationDefaults > > public static void switchProviderToJQuery( > MappedConfiguration<String, > > Object> configuration ) > > { > > configuration.add( > > SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery" ); > > } > > > > -- > > Chris > > > > > > > > On Tue, May 27, 2014 at 8:29 AM, Ilya Obshadko <ilya.obsha...@gmail.com > > >wrote: > > > > > So this obviously happens inside t5/core/console initialization. > > > > > > This is a code fragment in dom.js causing the error: > > > > > > ElementWrapper.prototype.attr = function(name, value) { > > > var attributeName, current; > > > > > > if (_.isObject(name)) { > > > for (attributeName in name) { > > > value = name[attributeName]; > > > this.attr(attributeName, value); > > > } > > > return this; > > > } > > > current = this.element.readAttribute(name); // <-- HERE!!! > > > if (arguments.length > 1) { > > > this.element.writeAttribute(name, value === void 0 ? null : > > > value); > > > } > > > return current; > > > }; > > > > > > readAttribute is not defined (and I believe it shouldn't, because it's > a > > > part of Prototype API and I'm using jQuery as infrastructure provider). > > > > > > Any ideas? > > > > > > > > > > > > On Tue, May 27, 2014 at 10:07 AM, Ilya Obshadko < > ilya.obsha...@gmail.com > > > >wrote: > > > > > > > I tried both methods suggested, but page load still produces the same > > > > error. > > > > > > > > Then I have turned off all of my custom application JS, by commenting > > out > > > > @Import, javaScriptSupport.addScript() and > > > > javaScriptSupport.addInitializerCall(). > > > > That didn't help either. > > > > > > > > I still have this stack trace in browser console: > > > > > > > > Uncaught TypeError: undefined is not a function dom.js:134 > > > > ElementWrapper.attr dom.js:134 > > > > (anonymous function) console.js:34 > > > > context.execCb require.js:1650 > > > > Module.check require.js:866 > > > > (anonymous function) require.js:1113 > > > > (anonymous function) require.js:132 > > > > (anonymous function) require.js:1156 > > > > each require.js:57 > > > > Module.emit require.js:1155 > > > > Module.check require.js:917 > > > > (anonymous function) require.js:1113 > > > > (anonymous function) require.js:132 > > > > (anonymous function) require.js:1156 > > > > each require.js:57 > > > > Module.emit require.js:1155 > > > > Module.check require.js:917 > > > > Module.enable require.js:1143 > > > > Module.init require.js:774 > > > > callGetModule require.js:1170 > > > > context.completeLoad require.js:1544 > > > > context.onScriptLoad require.js:1671 > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > On Tue, May 27, 2014 at 9:31 AM, Ilya Obshadko < > > ilya.obsha...@gmail.com > > > >wrote: > > > > > > > >> Thanks everyone, that's totally makes sense. > > > >> > > > >> > > > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender < > > > >> geoff.callender.jumpst...@gmail.com> wrote: > > > >> > > > >>> Hang on - with T5.4 beta-3 I'm pretty sure I'm not doing any of > that! > > > >>> bootstrap.css and bootstrap.js are drawn in automatically as part > of > > > T5's > > > >>> core. To use a bootstrap module in your page, try this sort of > thing: > > > >>> > > > >>> void afterRender() { > > > >>> javaScriptSupport.require("bootstrap/dropdown"); > > > >>> } > > > >>> > > > >>> and to use a bootstrap module in your javaScript, try this sort of > > > thing: > > > >>> > > > >>> define(["jquery", "bootstrap/button"], function($, button) { > > > >>> // etc > > > >>> } > > > >>> > > > >>> BTW, I use jQuery as the infrastructure provider. > > > >>> > > > >>> public static void > > > >>> contributeApplicationDefaults(MappedConfiguration<String, String> > > > >>> configuration) { > > > >>> > > > >>> > configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, > > > >>> "jquery"); > > > >>> } > > > >>> > > > >>> Have I missed something? > > > >>> > > > >>> On 27 May 2014, at 9:09 am, Jon Williams < > > williams.jonat...@gmail.com> > > > >>> wrote: > > > >>> > > > >>> > 1 other thing, you will have to Import the bootstrap.js into your > > ui > > > >>> class > > > >>> > to get it all working. > > > >>> > > > > >>> > @Import(library = {"context:bootstrap/js/bootstrap.js"}) > > > >>> > public class Index { > > > >>> > > > > >>> > > > > >>> > On Mon, May 26, 2014 at 4:59 PM, Jon Williams > > > >>> > <williams.jonat...@gmail.com>wrote: > > > >>> > > > > >>> >> it's easy to custom setup Tapestry 5.4 to the latest bootstrap > > > >>> version, > > > >>> >> with all the widgets. > > > >>> >> > > > >>> >> make the contribution to the environment like so: > > > >>> >> > > > >>> >> configuration.add(SymbolConstants.BOOTSTRAP_ROOT, > > > >>> "context:bootstrap"); > > > >>> >> > > > >>> >> then, make a bootstrap distro directory in your webapp context. > > then > > > >>> put a > > > >>> >> a full bootstrap distro in it. > > > >>> >> > > > >>> >> Walla, you are running "whatever" version of bootstrap with any > of > > > >>> the the > > > >>> >> widgets. > > > >>> >> > > > >>> >> > > > >>> >> On Mon, May 26, 2014 at 4:01 PM, Thiago H de Paula Figueiredo < > > > >>> >> thiag...@gmail.com> wrote: > > > >>> >> > > > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko < > > > >>> >>> ilya.obsha...@gmail.com> wrote: > > > >>> >>> > > > >>> >>> I did. Still got the same error. > > > >>> >>>> > > > >>> >>> > > > >>> >>> Tapestry doesn't include the full Bootstrap set of .js files, > so > > > >>> you'll > > > >>> >>> need to import yourself. The Tapestry out-of-the-box Bootstrap > > > >>> offerings > > > >>> >>> right now are focused on the CSS side, not on the widget one. > > > >>> >>> > > > >>> >>> There's https://github.com/trsvax/tapestry-bootstrap, but it > > > wasn't > > > >>> >>> upgraded to 5.4 yet. > > > >>> >>> > > > >>> >>> -- > > > >>> >>> 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 > > > >>> >>> > > > >>> >>> > > > >>> >> > > > >>> > > > >>> > > > >> > > > >> > > > >> -- > > > >> Ilya Obshadko > > > >> > > > >> > > > > > > > > > > > > -- > > > > Ilya Obshadko > > > > > > > > > > > > > > > > > -- > > > Ilya Obshadko > > > > > > > > > -- > Ilya Obshadko >