You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ilya Obshadko <il...@gmail.com> on 2014/05/26 18:26:02 UTC

[T5.4] Bootstrap and jQuery related JS libraries

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

Posted by Arve Klev <ar...@gmail.com>.
>2014-10-19 15:18 GMT+02:00 Thiago H de Paula Figueiredo <thiagohp@gmail.com
>:
>Awesome example, Arve! Thanks for sharing!
 :-)



> On Sat, 18 Oct 2014 13:32:08 -0300, Arve Klev <ar...@gmail.com> wrote:
>
>  This could be done in a much simpler way today, I think.
>>
>> I'm using Tapestry 5.4-beta-22 and only the libraries shipped by
>> Tapestry (Bootstrap, etc.) - love it.
>> To use Bootstraps popover.js, a component we must initialize ourself, I
>> only need to do this:
>>
>> In my Layout component (include the modules as needed):
>> @Import(module={"bootstrap/collapse", "bootstrap/dropdown",
>> "bootstrap/popover"}) //<— added "bootstrap/popover" - could have
>> added "my-js-popover"
>> here also, and not in the page class
>> public class Layout
>> {
>> . . .
>> }
>>
>> In my page class:
>> public class ListSomething
>> {
>> @Inject
>> private JavaScriptSupport javaScriptSupport;
>>
>> public void afterRender()
>> {
>> javaScriptSupport.require("my-js-popover"); //<— import my js-file from
>> "src/main/resources/META-INF/modules"
>>
>> {
>> . . .
>> }
>>
>> In my page ListSomething.tml:
>> <html t:type="Layout" t:title="literal:List Something"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
>> xmlns:p="tapestry:parameter">
>> . . .
>> <button type="button" class="btn btn-lg btn-danger" data-toggle="popover"
>> id="myPop"
>> title="Popover title" data-content="And here's some amazing
>> content.">Click
>> </button>
>> . . .
>> </html>
>>
>> In my "src/main/resources/META-INF/modules/my-js-popover.js":
>> define(["jquery", "bootstrap/popover"], function($, popover) {
>> var $pop = $("#myPop");
>> $pop.popover({placement : 'top'});
>> });
>>
>> No changes in the default AppModule.
>>
>> This is great!
>>
>> ---
>> Arve Kev
>>
>> 2014-05-27 22:54 GMT+02:00 Basile Chandesris <ba...@free.fr>:
>>
>>  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=
>>> bb23cdc21f68a655f8f2c24bb8c2c2
>>> ce5369ca12
>>>
>>> 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=5bf078217acb821cb8628d34bc59cd
>>> 5c4acd6e23;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 <ilya.obshadko@gmail.com
>>>> >
>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
Awesome example, Arve! Thanks for sharing!

On Sat, 18 Oct 2014 13:32:08 -0300, Arve Klev <ar...@gmail.com> wrote:

> This could be done in a much simpler way today, I think.
>
> I'm using Tapestry 5.4-beta-22 and only the libraries shipped by
> Tapestry (Bootstrap, etc.) - love it.
> To use Bootstraps popover.js, a component we must initialize ourself, I
> only need to do this:
>
> In my Layout component (include the modules as needed):
> @Import(module={"bootstrap/collapse", "bootstrap/dropdown",
> "bootstrap/popover"}) //<— added "bootstrap/popover" - could have
> added "my-js-popover"
> here also, and not in the page class
> public class Layout
> {
> . . .
> }
>
> In my page class:
> public class ListSomething
> {
> @Inject
> private JavaScriptSupport javaScriptSupport;
>
> public void afterRender()
> {
> javaScriptSupport.require("my-js-popover"); //<— import my js-file from
> "src/main/resources/META-INF/modules"
>
> {
> . . .
> }
>
> In my page ListSomething.tml:
> <html t:type="Layout" t:title="literal:List Something"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
> xmlns:p="tapestry:parameter">
> . . .
> <button type="button" class="btn btn-lg btn-danger" data-toggle="popover"
> id="myPop"
> title="Popover title" data-content="And here's some amazing  
> content.">Click
> </button>
> . . .
> </html>
>
> In my "src/main/resources/META-INF/modules/my-js-popover.js":
> define(["jquery", "bootstrap/popover"], function($, popover) {
> var $pop = $("#myPop");
> $pop.popover({placement : 'top'});
> });
>
> No changes in the default AppModule.
>
> This is great!
>
> ---
> Arve Kev
>
> 2014-05-27 22:54 GMT+02:00 Basile Chandesris <ba...@free.fr>:
>
>> 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=bb23cdc21f68a655f8f2c24bb8c2c2
>> ce5369ca12
>>
>> 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=5bf078217acb821cb8628d34bc59cd
>> 5c4acd6e23;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  
>>> <il...@gmail.com>
>>> 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
>>>>
>>>>
>>>>
>>>
>>


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

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


Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Chris Mylonas <ch...@opencsta.org>.
Thanks I'll give this a shot with some accordion js stuff that isn't
working.

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Arve Klev <ar...@gmail.com>.
This could be done in a much simpler way today, I think.

I'm using Tapestry 5.4-beta-22 and only the libraries shipped by
Tapestry (Bootstrap, etc.) - love it.
To use Bootstraps popover.js, a component we must initialize ourself, I
only need to do this:

In my Layout component (include the modules as needed):
@Import(module={"bootstrap/collapse", "bootstrap/dropdown",
"bootstrap/popover"}) //<— added "bootstrap/popover" - could have
added "my-js-popover"
here also, and not in the page class
public class Layout
{
. . .
}

In my page class:
public class ListSomething
{
@Inject
private JavaScriptSupport javaScriptSupport;

public void afterRender()
{
javaScriptSupport.require("my-js-popover"); //<— import my js-file from
"src/main/resources/META-INF/modules"

{
. . .
}

In my page ListSomething.tml:
<html t:type="Layout" t:title="literal:List Something"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_4.xsd"
xmlns:p="tapestry:parameter">
. . .
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover"
id="myPop"
title="Popover title" data-content="And here's some amazing content.">Click
</button>
. . .
</html>

In my "src/main/resources/META-INF/modules/my-js-popover.js":
define(["jquery", "bootstrap/popover"], function($, popover) {
var $pop = $("#myPop");
$pop.popover({placement : 'top'});
});

No changes in the default AppModule.

This is great!

---
Arve Kev

2014-05-27 22:54 GMT+02:00 Basile Chandesris <ba...@free.fr>:

> 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=bb23cdc21f68a655f8f2c24bb8c2c2
> ce5369ca12
>
> 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=5bf078217acb821cb8628d34bc59cd
> 5c4acd6e23;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 <il...@gmail.com>
>> 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

Posted by Basile Chandesris <ba...@free.fr>.
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 <il...@gmail.com>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

Posted by Chris Poulsen <ma...@nesluop.dk>.
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 <il...@gmail.com>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 <ilya.obshadko@gmail.com
> >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 <mailinglist@nesluop.dk
> >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.obshadko@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 <
> mailinglist@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.obshadko@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.obshadko@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.obshadko@gmail.com
> >> > > > >wrote:
> >> > > > >
> >> > > > >> Thanks everyone, that's totally makes sense.
> >> > > > >>
> >> > > > >>
> >> > > > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> >> > > > >> geoff.callender.jumpstart@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.jonathan@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
> >> > > > >>> > <wi...@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 <
> >> > > > >>> >> thiagohp@gmail.com> wrote:
> >> > > > >>> >>
> >> > > > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> >> > > > >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> >> > > > >>> >>> For additional commands, e-mail:
> >> > users-help@tapestry.apache.org
> >> > > > >>> >>>
> >> > > > >>> >>>
> >> > > > >>> >>
> >> > > > >>>
> >> > > > >>>
> >> > > > >>
> >> > > > >>
> >> > > > >> --
> >> > > > >> Ilya Obshadko
> >> > > > >>
> >> > > > >>
> >> > > > >
> >> > > > >
> >> > > > > --
> >> > > > > Ilya Obshadko
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Ilya Obshadko
> >> > > >
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Ilya Obshadko
> >> >
> >>
> >
> >
> >
> > --
> > Ilya Obshadko
> >
> >
>
>
> --
> Ilya Obshadko
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
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 <il...@gmail.com>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 <ma...@nesluop.dk>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.obshadko@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 <mailinglist@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.obshadko@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.obshadko@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.obshadko@gmail.com
>> > > > >wrote:
>> > > > >
>> > > > >> Thanks everyone, that's totally makes sense.
>> > > > >>
>> > > > >>
>> > > > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
>> > > > >> geoff.callender.jumpstart@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.jonathan@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
>> > > > >>> > <wi...@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 <
>> > > > >>> >> thiagohp@gmail.com> wrote:
>> > > > >>> >>
>> > > > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
>> > > > >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
>> > > > >>> >>> For additional commands, e-mail:
>> > users-help@tapestry.apache.org
>> > > > >>> >>>
>> > > > >>> >>>
>> > > > >>> >>
>> > > > >>>
>> > > > >>>
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> Ilya Obshadko
>> > > > >>
>> > > > >>
>> > > > >
>> > > > >
>> > > > > --
>> > > > > Ilya Obshadko
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > Ilya Obshadko
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > Ilya Obshadko
>> >
>>
>
>
>
> --
> Ilya Obshadko
>
>


-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
>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 <ma...@nesluop.dk>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.obshadko@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 <mailinglist@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.obshadko@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.obshadko@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.obshadko@gmail.com
> > > > >wrote:
> > > > >
> > > > >> Thanks everyone, that's totally makes sense.
> > > > >>
> > > > >>
> > > > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> > > > >> geoff.callender.jumpstart@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.jonathan@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
> > > > >>> > <wi...@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
> <
> > > > >>> >> thiagohp@gmail.com> wrote:
> > > > >>> >>
> > > > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> > > > >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> > > > >>> >>> For additional commands, e-mail:
> > users-help@tapestry.apache.org
> > > > >>> >>>
> > > > >>> >>>
> > > > >>> >>
> > > > >>>
> > > > >>>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Ilya Obshadko
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > Ilya Obshadko
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Ilya Obshadko
> > > >
> > >
> >
> >
> >
> > --
> > Ilya Obshadko
> >
>



-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Chris Poulsen <ma...@nesluop.dk>.
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 <il...@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 <mailinglist@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.obshadko@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.obshadko@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.obshadko@gmail.com
> > > >wrote:
> > > >
> > > >> Thanks everyone, that's totally makes sense.
> > > >>
> > > >>
> > > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> > > >> geoff.callender.jumpstart@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.jonathan@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
> > > >>> > <wi...@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 <
> > > >>> >> thiagohp@gmail.com> wrote:
> > > >>> >>
> > > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> > > >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> > > >>> >>> For additional commands, e-mail:
> users-help@tapestry.apache.org
> > > >>> >>>
> > > >>> >>>
> > > >>> >>
> > > >>>
> > > >>>
> > > >>
> > > >>
> > > >> --
> > > >> Ilya Obshadko
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > Ilya Obshadko
> > > >
> > > >
> > >
> > >
> > > --
> > > Ilya Obshadko
> > >
> >
>
>
>
> --
> Ilya Obshadko
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
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 <ma...@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.obshadko@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.obshadko@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.obshadko@gmail.com
> > >wrote:
> > >
> > >> Thanks everyone, that's totally makes sense.
> > >>
> > >>
> > >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> > >> geoff.callender.jumpstart@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.jonathan@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
> > >>> > <wi...@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 <
> > >>> >> thiagohp@gmail.com> wrote:
> > >>> >>
> > >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> > >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> > >>> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>> >>>
> > >>> >>>
> > >>> >>
> > >>>
> > >>>
> > >>
> > >>
> > >> --
> > >> Ilya Obshadko
> > >>
> > >>
> > >
> > >
> > > --
> > > Ilya Obshadko
> > >
> > >
> >
> >
> > --
> > Ilya Obshadko
> >
>



-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Chris Poulsen <ma...@nesluop.dk>.
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 <il...@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.obshadko@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.obshadko@gmail.com
> >wrote:
> >
> >> Thanks everyone, that's totally makes sense.
> >>
> >>
> >> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> >> geoff.callender.jumpstart@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 <wi...@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
> >>> > <wi...@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 <
> >>> >> thiagohp@gmail.com> wrote:
> >>> >>
> >>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> >>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> >>> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>> >>>
> >>> >>>
> >>> >>
> >>>
> >>>
> >>
> >>
> >> --
> >> Ilya Obshadko
> >>
> >>
> >
> >
> > --
> > Ilya Obshadko
> >
> >
>
>
> --
> Ilya Obshadko
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
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 <il...@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 <il...@gmail.com>wrote:
>
>> Thanks everyone, that's totally makes sense.
>>
>>
>> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
>> geoff.callender.jumpstart@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 <wi...@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
>>> > <wi...@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 <
>>> >> thiagohp@gmail.com> wrote:
>>> >>
>>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
>>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
>>> >>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> >>>
>>> >>>
>>> >>
>>>
>>>
>>
>>
>> --
>> Ilya Obshadko
>>
>>
>
>
> --
> Ilya Obshadko
>
>


-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
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 <il...@gmail.com>wrote:

> Thanks everyone, that's totally makes sense.
>
>
> On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
> geoff.callender.jumpstart@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 <wi...@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
>> > <wi...@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 <
>> >> thiagohp@gmail.com> wrote:
>> >>
>> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
>> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
>> >>> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>>
>> >>>
>> >>
>>
>>
>
>
> --
> Ilya Obshadko
>
>


-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
Thanks everyone, that's totally makes sense.


On Tue, May 27, 2014 at 7:56 AM, Geoff Callender <
geoff.callender.jumpstart@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 <wi...@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
> > <wi...@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 <
> >> thiagohp@gmail.com> wrote:
> >>
> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>
>
>


-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Jon Williams <wi...@gmail.com>.
that could be so Geoff.
maybe the only advantage to doing it my way is you can switch up bootstrap
versions beyond what tapestry is baking in.


On Mon, May 26, 2014 at 9:56 PM, Geoff Callender <
geoff.callender.jumpstart@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 <wi...@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
> > <wi...@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 <
> >> thiagohp@gmail.com> wrote:
> >>
> >>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
> >>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
> >>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>
> >>>
> >>
>
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Geoff Callender <ge...@gmail.com>.
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 <wi...@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
> <wi...@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 <
>> thiagohp@gmail.com> wrote:
>> 
>>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
>>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>> 
>>> 
>> 


Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Jon Williams <wi...@gmail.com>.
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
<wi...@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 <
> thiagohp@gmail.com> wrote:
>
>> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <
>> ilya.obshadko@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-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Jon Williams <wi...@gmail.com>.
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 <
thiagohp@gmail.com> wrote:

> On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko <il...@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 26 May 2014 16:46:27 -0300, Ilya Obshadko  
<il...@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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
I did. Still got the same error.


On Mon, May 26, 2014 at 10:25 PM, Lance Java <la...@googlemail.com>wrote:

> Have you swapped the infrastructure provider from prototype to jquery?
>
> Details here:
> https://github.com/bobharner/blog/wiki/Jumping-Into-Tapestry-5.4-Alpha-3
>  On 26 May 2014 18:00, "Ilya Obshadko" <il...@gmail.com> wrote:
>
> > 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 <ilya.obshadko@gmail.com
> > >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
> > >
> > >
> >
> >
> > --
> > Ilya Obshadko
> >
>



-- 
Ilya Obshadko

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Lance Java <la...@googlemail.com>.
Have you swapped the infrastructure provider from prototype to jquery?

Details here:
https://github.com/bobharner/blog/wiki/Jumping-Into-Tapestry-5.4-Alpha-3
 On 26 May 2014 18:00, "Ilya Obshadko" <il...@gmail.com> wrote:

> 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 <ilya.obshadko@gmail.com
> >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
> >
> >
>
>
> --
> Ilya Obshadko
>

Re: [T5.4] Bootstrap and jQuery related JS libraries

Posted by Ilya Obshadko <il...@gmail.com>.
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 <il...@gmail.com>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
>
>


-- 
Ilya Obshadko