Re: Grids Bean Model does not support "is" methods
Theoretically yes, but the problem is, that the property is not even in the grids bean model present. Nothing doing. On Tue, 27 May 2014 17:40:56 +0100, Lance Java wrote: > As a quick workaround you can use the grid's "add" parameter to add the > property and provide a custom block to render the column. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry ClassLoading errors
I will try to search for the direct usage of the class and to remove it if I find it Thanks On Tue, May 27, 2014 at 5:50 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Tue, 27 May 2014 10:29:09 -0300, Boris Horvat > wrote: > > But it is only triggered in class re loading >> > > It could be a reloadable service being used both injected from > Tapestry-IoC and directly, not through T-IoC. If something is live class > reloadable, you should always access it though Tapestry (classes in > controlled packages) or Tapestry-IoC (injected services). > > -- > 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 > > -- Sincerely *Boris Horvat*
Re: [T5.4] Bootstrap and jQuery related JS libraries
Since 5.4-alpha-15 , tapestry use Bootstrap 3.x. https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=tree;h=f43e87abf9b77f08b99e90aa22b6d54f20ce7bd1;hb=bb23cdc21f68a655f8f2c24bb8c2c2ce5369ca12 http://getbootstrap.com/ http://getbootstrap.com/2.3.2/ 5.4-beta-6: Bootstrap 3.0.3 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=234ec514afc376252c5c526e4b2bd3cab6c83a5e jQuery 1.11.1 / 1.9.1 RequireJS 2.1.11 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=5b12cea9f97e12b1433cf960b83e7bcc45bee63d Moment.js 2.6.0 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=36375f07cb45f6da87434f4c2ba2b010397d0e05 Underscore 1.5.2 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=d27925498a3589c8d53fb25b0cdf79e43482f2b0 Typeahead 0.9.3 CoffeeScript 1.7.1 https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=commit;h=218d4c722f15e0f142fa5c05e59b766cad714d0d https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/modules/JavaScriptModule.java;h=5bf078217acb821cb8628d34bc59cd5c4acd6e23;hb=5bf078217acb821cb8628d34bc59cd5c4acd6e23 Le 26/05/14 18:59, Ilya Obshadko a écrit : Turns out I've got "Uncaught TypeError: undefined is not a function" in dom.js, line 134. Don't have any idea where it might come from. On Mon, May 26, 2014 at 8:26 PM, Ilya Obshadko wrote: I've just started migrating from 5.3 to 5.4-beta3. My application already heavily relies on Bootstrap and jQuery. Previously I was using Bootstrap version 2.3.2, so that's a good time to upgrade Bootstrap as well. Could someone clarify this for me: Tapestry 5.4 distribution already contains everything needed to work out of the box? Or do I have to import Bootstrap libraries manually? Because all Bootstrap controls just stopped working, there are no event handlers installed and it seems to me that bootstrap.js file bundled with Tapestry is very minimal one. -- Ilya Obshadko
Re: [T5.4] Bootstrap and jQuery related JS libraries
Check out the tapestry-webresources test sources/resources. They have an example of how to use a bootstrap placed in webapp context. That should be a good starting point for both context-based resources and a bootstrap in a non-default location. -- Chris On Tue, May 27, 2014 at 6:33 PM, Ilya Obshadko wrote: > In fact, only clearing the browser cache helped to solve my problem - > modules started working after that. > > Still everything is pretty messed up: > > - context-based resources are not loaded. > - trying to point Bootstrap root to non-default location results in "cannot > load module" errors > > etc etc > > But that's at least a place to start. > > > > On Tue, May 27, 2014 at 5:54 PM, Ilya Obshadko >wrote: > > > From the previous posts it seems that I have already completed all the > > necessary steps to get jQuery infrastructure working. But it doesn't. > > > > I just don't have an idea (yet) what to try next. > > > > > > On Tue, May 27, 2014 at 1:28 PM, Chris Poulsen >wrote: > > > >> 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 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 >> > > 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 > >> > > > > Modul
Re: Grids Bean Model does not support "is" methods
As a quick workaround you can use the grid's "add" parameter to add the property and provide a custom block to render the column.
Re: [T5.4] Bootstrap and jQuery related JS libraries
In fact, only clearing the browser cache helped to solve my problem - modules started working after that. Still everything is pretty messed up: - context-based resources are not loaded. - trying to point Bootstrap root to non-default location results in "cannot load module" errors etc etc But that's at least a place to start. On Tue, May 27, 2014 at 5:54 PM, Ilya Obshadko wrote: > From the previous posts it seems that I have already completed all the > necessary steps to get jQuery infrastructure working. But it doesn't. > > I just don't have an idea (yet) what to try next. > > > On Tue, May 27, 2014 at 1:28 PM, Chris Poulsen wrote: > >> 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 > >wrote: >> >> > Here's my version of contributeApplicationDefaults(): >> > >> > public static void contributeApplicationDefaults ( >> > MappedConfiguration 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 > > >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> > > 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.comple
Re: Tapestry ClassLoading errors
On Tue, 27 May 2014 10:29:09 -0300, Boris Horvat wrote: But it is only triggered in class re loading It could be a reloadable service being used both injected from Tapestry-IoC and directly, not through T-IoC. If something is live class reloadable, you should always access it though Tapestry (classes in controlled packages) or Tapestry-IoC (injected services). -- 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
Re: Grids Bean Model does not support "is" methods
Hi, yes I know this but I forgot to tell that the bean is generated from a WSDL file and the generation process seems not to "know" about the bean spec ;-) Thanks for your help. Regards Eric On Tue, 27 May 2014 14:18:28 +0100, Lance Java wrote: > If you read the java beans spec, you'll see that "is" can only be used for > primitive boolean, not java.lang.Boolean. > > I remember this was discussed in the past that tapestry could be a bit more > lenient here and support Boolean but I don't think anything done. Please > file a jira. > On 27 May 2014 13:34, "Erich Gormann" wrote: > >> Hi all, >> >> in my grid I want to display a bean containig a property of type Boolean, >> which has not getter, but an "is" method. >> The grids reports the error, that the property is missing in the bean to >> render. >> >> How to get grid working with "is" methods? >> >> Thanks in advance for your help >> Eric >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.4] Bootstrap and jQuery related JS libraries
>From the previous posts it seems that I have already completed all the necessary steps to get jQuery infrastructure working. But it doesn't. I just don't have an idea (yet) what to try next. On Tue, May 27, 2014 at 1:28 PM, Chris Poulsen wrote: > 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 >wrote: > > > Here's my version of contributeApplicationDefaults(): > > > > public static void contributeApplicationDefaults ( > > MappedConfiguration 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 > >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 > > 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! > >
Re: Tapestry ClassLoading errors
But it is only triggered in class re loading On 27 May 2014 15:11, "Taha Siddiqi" wrote: > It looks like a dependency problem. Two versions of tapestry-core in class > path perhaps. > > Sent from my iPhone > > > On May 27, 2014, at 5:30 PM, Boris Horvat > wrote: > > > > Anyone has any idea? > >> On 24 May 2014 11:30, "Boris Horvat" wrote: > >> > >> > >> Hi everyone, > >> > >> I have create a service to help me reload different ajax zone but I get > >> the following exception > >> > >> java.lang.LinkageError > >> loader constraint violation: when resolving method > >> > "com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V" > >> the class loader (instance of > >> org/apache/tapestry5/internal/plastic/PlasticClassLoader) of the current > >> class, com/bomahabo/flow/tapestry/pages/blackbox/Assets, and the class > >> loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) for > >> resolved class, com/bomahabo/flow/tapestry/utility/AjaxZonesReloader, > have > >> different Class objects for the type > >> > com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V > >> used in the signature > >> > >> Class definition and package location > >> > >> package com.bomahabo.flow.*tapestry.utility* > >> > >> public class AjaxZonesReloader { > >> > >>private AjaxResponseRenderer ajaxResponseRenderer; > >>private Request request; > >>private JavaScriptSupport javascript; > >> > >>public AjaxZonesReloader(AjaxResponseRenderer ajaxResponseRenderer, > >> Request request, JavaScriptSupport javascript) { > >>this.ajaxResponseRenderer = ajaxResponseRenderer; > >>this.request = request; > >>this.javascript = javascript; > >>} > >> > >> Thank you :) > >> > >> -- > >> Sincerely > >> *Boris Horvat* > >> > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Grids Bean Model does not support "is" methods
If you read the java beans spec, you'll see that "is" can only be used for primitive boolean, not java.lang.Boolean. I remember this was discussed in the past that tapestry could be a bit more lenient here and support Boolean but I don't think anything done. Please file a jira. On 27 May 2014 13:34, "Erich Gormann" wrote: > Hi all, > > in my grid I want to display a bean containig a property of type Boolean, > which has not getter, but an "is" method. > The grids reports the error, that the property is missing in the bean to > render. > > How to get grid working with "is" methods? > > Thanks in advance for your help > Eric > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Re: Tapestry ClassLoading errors
It looks like a dependency problem. Two versions of tapestry-core in class path perhaps. Sent from my iPhone > On May 27, 2014, at 5:30 PM, Boris Horvat wrote: > > Anyone has any idea? >> On 24 May 2014 11:30, "Boris Horvat" wrote: >> >> >> Hi everyone, >> >> I have create a service to help me reload different ajax zone but I get >> the following exception >> >> java.lang.LinkageError >> loader constraint violation: when resolving method >> "com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V" >> the class loader (instance of >> org/apache/tapestry5/internal/plastic/PlasticClassLoader) of the current >> class, com/bomahabo/flow/tapestry/pages/blackbox/Assets, and the class >> loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) for >> resolved class, com/bomahabo/flow/tapestry/utility/AjaxZonesReloader, have >> different Class objects for the type >> com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V >> used in the signature >> >> Class definition and package location >> >> package com.bomahabo.flow.*tapestry.utility* >> >> public class AjaxZonesReloader { >> >>private AjaxResponseRenderer ajaxResponseRenderer; >>private Request request; >>private JavaScriptSupport javascript; >> >>public AjaxZonesReloader(AjaxResponseRenderer ajaxResponseRenderer, >> Request request, JavaScriptSupport javascript) { >>this.ajaxResponseRenderer = ajaxResponseRenderer; >>this.request = request; >>this.javascript = javascript; >>} >> >> Thank you :) >> >> -- >> Sincerely >> *Boris Horvat* >> - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: FreeMarker configuration problems
Hi Thilo, thank you for your response. I solved it like you said using ClasspathResource and it works :). Kind regards, Lidija On Mon, May 26, 2014 at 3:30 PM, Thilo Tanner wrote: > Hi Lidija, > > I don't use Chenillekit for Freemarker, but I integrated Freemarker not > too long ago, also to render emails, using the AssetSource service: > > First, I created a AssetTemplateLoader implements TemplateLoader which > uses the AssetSource service behind the scenes to load the actual template > from a regular Resource object. > > Then I created a Freemarker service with a render method. Something like > this: > > public String render(Resource templateResource, Map dataModel) > > to render the text (or email) to a String. Now, you can inject your > template as a Resource object into the service / page which is using the > Freemarker service. Using the AssetSource also allow you to create > localized template files, if necessary. > > Best, > Thilo > > > From: Lidija Dolinar > Sent: Monday, May 26, 2014 15:03 > To: Tapestry users > Subject: FreeMarker configuration problems > > Hi, > > I'm trying to use freemarker templates according to the following > instructions: > > http://chenillekit.codehaus.org/chenillekit-template/howto_freemarkerservice.html > > My code in AppModule is the same as specified above. > > In my Java code I'm trying to send mail with the use of a template file: > > OutputStream emailBodyStream = new ByteArrayOutputStream(); > templateService.mergeDataWithResource(new > URIResource("./templates/test.ftl"), emailBodyStream, parameterMap); > mailService.sendHtmlMail(mmh, emailBodyStream.toString()); > > > The template file is not found - I get exceptions no matter how I set the > URIResource path to the template file: > > - If the path is "./templates/test.ftl", there's a > "java.lang.IllegalArgumentException: URI is not absolute" exception in > URIResource.exists() method when calling uri.toURL(). > Why does this error occur? (the instructions specify relative path to the > file as a parameter to the URIResource). > > - If the path is an absolute filepath, i.e. > "file:/home/lidija/workspace/.../templates/test.ftl", there's a > "java.lang.RuntimeException: Template file:/home/lidija/workspace/... not > found". The file exists though and has read / write / execute permissions > on it. > (I'm just trying to understand, of course the path shouldn't be set like > this.) > > - If the path is absolute filepath to the file, without the "file:" String, > the eror is again "java.lang.IllegalArgumentException: URI is not absolute" > > > My questions are: > - should I specifically set the path to the "templates" folder at > configuration time? > - how to specify the template filename parameter to URIResource? > > Any suggestions welcome. > > Kind regards, > Lidija > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Grids Bean Model does not support "is" methods
Hi all, in my grid I want to display a bean containig a property of type Boolean, which has not getter, but an "is" method. The grids reports the error, that the property is missing in the bean to render. How to get grid working with "is" methods? Thanks in advance for your help Eric - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry ClassLoading errors
Anyone has any idea? On 24 May 2014 11:30, "Boris Horvat" wrote: > > Hi everyone, > > I have create a service to help me reload different ajax zone but I get > the following exception > > java.lang.LinkageError > loader constraint violation: when resolving method > "com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V" > the class loader (instance of > org/apache/tapestry5/internal/plastic/PlasticClassLoader) of the current > class, com/bomahabo/flow/tapestry/pages/blackbox/Assets, and the class > loader (instance of org/eclipse/jetty/webapp/WebAppClassLoader) for > resolved class, com/bomahabo/flow/tapestry/utility/AjaxZonesReloader, have > different Class objects for the type > com.bomahabo.flow.tapestry.utility.AjaxZonesReloader.refreshAjaxZones([Lorg/apache/tapestry5/corelib/components/Zone;)V > used in the signature > > Class definition and package location > > package com.bomahabo.flow.*tapestry.utility* > > public class AjaxZonesReloader { > > private AjaxResponseRenderer ajaxResponseRenderer; > private Request request; > private JavaScriptSupport javascript; > > public AjaxZonesReloader(AjaxResponseRenderer ajaxResponseRenderer, > Request request, JavaScriptSupport javascript) { > this.ajaxResponseRenderer = ajaxResponseRenderer; > this.request = request; > this.javascript = javascript; > } > > Thank you :) > > -- > Sincerely > *Boris Horvat* >
Re: [T5.4] Bootstrap and jQuery related JS libraries
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 wrote: > Here's my version of contributeApplicationDefaults(): > > public static void contributeApplicationDefaults ( > MappedConfiguration 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 >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 > Object> configuration ) > > { > > configuration.add( > > SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery" ); > > } > > > > -- > > Chris > > > > > > > > On Tue, May 27, 2014 at 8:29 AM, Ilya Obshadko > >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 inf
Re: [T5.4] Bootstrap and jQuery related JS libraries
Here's my version of contributeApplicationDefaults(): public static void contributeApplicationDefaults ( MappedConfiguration 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 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 Object> configuration ) > { > configuration.add( > SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery" ); > } > > -- > Chris > > > > On Tue, May 27, 2014 at 8:29 AM, Ilya Obshadko >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 > >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 > > >>> 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 bootstra
Re: [T5.4] Bootstrap and jQuery related JS libraries
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 configuration ) { configuration.add( SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery" ); } -- Chris On Tue, May 27, 2014 at 8:29 AM, Ilya Obshadko 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 >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 >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 > >>> configuration) { > >>> > >>> configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, > >>> "jquery"); > >>> } > >>> > >>> Have I missed something? > >>> > >>> On 27 May 2014, at 9:09 am, Jon Williams > >>> 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 > >>> > 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: > >>> >>> > >>> >>