Re: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
After reading your last comment that made you unhappy ;) I checked it out Yeah - putting assets in ${context} is going to be removed in tapestry-5.5 and is there for backwards compat for 5.3 So after reading [1] & [2] & [3] and a few failed attempts moved bootstrap main dir from src/main/webapp/assets/ to src/main/resources/META-INF/assets/ Updated AppModule's snippet to configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "META-INF/assets/bootstrap"); And it works. I have other assets to move into this spot for future-proofing, but will have to go through my .tml files to update ${context:...} to ${asset:} - another time. [1] - http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/META-INF-assets-in-5-4-td5714677.html [2] - https://github.com/bobharner/blog/wiki/Jumping-Into-Tapestry-5.4-Alpha-3 [3] - http://tapestry.apache.org/assets.html On Tue, 07 Oct 2014 15:02:27 +1100, nhhockeyplayer nashua wrote: Well I got my app to launch. Not sure if its correct... i thought everything is suppose to go into the META-INF/assets directory according to the new documentation anyway I had to eliminate @Contribute(ModuleManager.class) public static void setupBaseModules {...} altogether... t-5.4-beta-22 complained that it was already being implemented internally by tapestry... so I got rid of my implementation onward I had to copy ALL my bootstrap js files over to my root dir from my node_modules here are my default config configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:assets/bootstrap"); configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery"); In the end it accepted C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\css\* C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\fonts\* C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\js\* all the twitter plugins go here C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\js\bootstrap.min.js this is what t-5.4-beta-22 accepted I remain unclear about what js modules to copy over or whether there is replication. guess i will soon find out. below is the markup... i guess I will figure out what works and what doesnt from here on out. going to tryout jquery widgets. - cheers "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>data-debug-enabled="true" data-locale="en" xmlns="http://www.w3.org/1999/xhtml";>Login pagename="tapestry-page-name"/>href="/pphl/assets/ctx/z317f59ba/assets/bootstrap/css/bootstrap.css"/>type="text/css" rel="stylesheet" href="/pphl/assets/meta/z98619821/tapestry5/tapestry.css"/>type="text/css" rel="stylesheet" href="/pphl/assets/meta/ze8a5779c/tapestry5/exception-frame.css"/>type="text/css" rel="stylesheet" href="/pphl/assets/meta/zceffa0e4/tapestry5/tapestry-console.css"/>type="text/css" rel="stylesheet" href="/pphl/assets/meta/z44f0b8d4/tapestry5/tree.css"/>data-page-initialized="false" style="text-align:center;font-family:'lucida grande','lucida sans unicode','bitstream vera sans', 'trebuchet ms',arial,sans-serif;">type="text/javascript">document.write("class=\"pageloading-mask\">");class="tynamoMessage"> Welcome administrator, administrator : email acolas...@gmail.com! href="/pphl/pphl/facebookfriends.tynamologoutlink">Logoutdata-update-zone="friendResults" href="/pphl/pphl/facebookfriends.listfriends">Check who's my friendid="friendResults">var require = {"waitSeconds" : 300, "shim" : { "t5/core/typeahead" : [ "jquery" ], "bootstrap/affix" : [ "bootstrap/transition" ], "bootstrap/alert" : [ "bootstrap/transition" ], "bootstrap/modal" : [ "bootstrap/transition" ], "bootstrap/tab" : [ "bootstrap/transition" ], "bootstrap/transition" : [ "jquery" ], "bootstrap/button" : [ "bootstrap/transition" ], "bootstrap/scrollspy" : [ "bootstrap/transition" ], "bootstrap/collapse" : [ "bootstrap/transition" ], "bootstrap/dropdown" : [ "bootstrap/transition" ], "bootstrap/tooltip" : [ "bootstrap/transition" ], "bootstrap/carousel" : [ "bootstrap/transition" ], "bootstrap/popover" : [ "bootstrap/tooltip" ] }, "baseUrl" : "/pphl/modules.gz" };type="text/javascript">src="/pphl/assets/meta/z12d98417/tapestry5/underscore-1.5.2.js" type="text/javascript">src="/pphl/assets/meta/zd746764f/tapestry5/t53-compatibility.js" type="text/javascript">src="/pphl/assets/meta/z8631d47d/tapestry5/jquery.js" type="text/javascript">type="text/javascript">require(["t5/core/pageinit"], fu
RE: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
Well I got my app to launch. Not sure if its correct... i thought everything is suppose to go into the META-INF/assets directory according to the new documentation anyway I had to eliminate @Contribute(ModuleManager.class) public static void setupBaseModules {...} altogether... t-5.4-beta-22 complained that it was already being implemented internally by tapestry... so I got rid of my implementation onward I had to copy ALL my bootstrap js files over to my root dir from my node_modules here are my default config configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:assets/bootstrap"); configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery"); In the end it accepted C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\css\* C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\fonts\* C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\bootstrap\js\* all the twitter plugins go here C:\Prototype\Mavenized\Product\tynamo\trunk\tynamo-examples\pphl\src\main\webapp\assets\js\bootstrap.min.js this is what t-5.4-beta-22 accepted I remain unclear about what js modules to copy over or whether there is replication. guess i will soon find out. below is the markup... i guess I will figure out what works and what doesnt from here on out. going to tryout jquery widgets. - cheers http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>http://www.w3.org/1999/xhtml";>Login pagedocument.write(""); Welcome administrator, administrator : email acolas...@gmail.com! LogoutCheck who's my friendvar require = { "waitSeconds" : 300, "shim" : { "t5/core/typeahead" : [ "jquery" ], "bootstrap/affix" : [ "bootstrap/transition" ], "bootstrap/alert" : [ "bootstrap/transition" ], "bootstrap/modal" : [ "bootstrap/transition" ], "bootstrap/tab" : [ "bootstrap/transition" ], "bootstrap/transition" : [ "jquery" ], "bootstrap/button" : [ "bootstrap/transition" ], "bootstrap/scrollspy" : [ "bootstrap/transition" ], "bootstrap/collapse" : [ "bootstrap/transition" ], "bootstrap/dropdown" : [ "bootstrap/transition" ], "bootstrap/tooltip" : [ "bootstrap/transition" ], "bootstrap/carousel" : [ "bootstrap/transition" ], "bootstrap/popover" : [ "bootstrap/tooltip" ] }, "baseUrl" : "/pphl/modules.gz" }; require(["t5/core/pageinit"], function(pi) { pi([], [ "t5/core/zone" ]); });
Re: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
The transition functions also live in bootstrap.js - something I was happy to not know before :( you'll have to do more testing on the non-tapestry side - i've cobbled together what works for me, un-optimized, i.e. full dist. so ... when you run an app in node and browse to it, is transition.js mentioned in the html source code? if you d/l bootstrap dist and copy the transition.js file into your bootstrap/js dir, it all gets included - hard for it to flake out. At early stage of deving, I don't add anything but public static void contributeApplicationDefaults( MappedConfiguration configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just "en" (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma separated series of locale names; // the first locale name is the default when there's no reasonable match). configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en"); configuration.add(SymbolConstants.MINIFICATION_ENABLED, "false"); configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:assets/bootstrap"); configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery"); } into AppModule and it all works. src/main/webapp/assets/bootstrap/js/transition.js exists as a file I do not include any external jquery and let tapestry manage this - it is the same version as what bootstrap expects. On Tue, 07 Oct 2014 14:20:06 +1100, nhhockeyplayer nashua wrote: my last reply bothers me though... transition.js is built into bootstrap.js so I assume there will be a conflict somehow ? -- Using Opera's mail client: http://www.opera.com/mail/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
my last reply bothers me though... transition.js is built into bootstrap.js so I assume there will be a conflict somehow ?
RE: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
Thanks Chris for your gracious help its really appreciated. YEAH... there is an upper dir in my node platform housing the js file Transition.js for bootstrap. I didnt know if it was touchable ornot...it was not built into the dist dir And I am not sure if they are usable as-is or if they were compiled or not Here is my layout for node.js files for bootstrap C:\Prototype\Mavenized\GitRepository\twbs\node_modules\bootstrap\dist C:\Prototype\Mavenized\GitRepository\twbs\node_modules\bootstrap\dist\css C:\Prototype\Mavenized\GitRepository\twbs\node_modules\bootstrap\dist\fonts C:\Prototype\Mavenized\GitRepository\twbs\node_modules\bootstrap\dist\js this is where the plugin files like, Transition.js, are located C:\Prototype\Mavenized\GitRepository\twbs\node_modules\bootstrap\js ok I will drop the whole js dir into my directory structure hoping they are ok as-is
RE: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
then I added this @Contribute(ModuleManager.class) public static void setupBaseModules(MappedConfiguration configuration, @Path("context:assets/js/bootstrap.min.js") Resource bootstrap, @Path("context:assets/js/jquery.min.js") Resource jquery ) { configuration.add("bootstrap", new JavaScriptModuleConfiguration(bootstrap)); configuration.add("jquery", new JavaScriptModuleConfiguration(jquery)); } and t-5.4-beta-22 continues to try and find a file Transition.js Thanks for any help out of this Best regards and thanks... KEN
Re: t-5.4-beta-22 trying to drop in a prebuilt bootstrap
hi ken, short answer: download transition.js into your js directory. does your custom distribution contain the relevant js? test your distribution against plain html/css/js from http://getbootstrap.com/getting-started/#examples unabridged: I just looked in _my_ src/main/webapp/assets/bootstrap directory which has (css|js|fonts) subdirectories and there is a js/transition.js file so must have come across the error before and totally forgotten about it until now. Either: a) download that file and put it into _your_ js directory and re-run; or, b) check those methods are in your included bootstrap.js file you are obviously playing around with compiling your own bootstrap distribution and the top of this page http://getbootstrap.com/javascript/ says separate *.js files or all inclusive single file (b) I haven't tested BOOTSTRAP_ROOT to house other files and what behaviour effects occur. Why not just put bootstrap in it's own directory - makes life easier? like in your source code's comment. chris On Tue, 07 Oct 2014 13:44:32 +1100, nhhockeyplayer nashua wrote: Hi Folks, I installed node.js, and installed grunt bower and npm and all that build platform for javascript runs fine... I have been using NPM to checkout jquery, angular and bootstrap out of gitgub and build them. As a result typically I end up with a dist directory housing a CSS file and a js file and a min.js file for any respective module. I am cobbling together a t-5.4-beta-22 app So I dropped my dist from above into src/main/webapp/assets here is my dir layout for bootstrap src/main/webapp/assets/css src/main/webapp/assets/fonts src/main/webapp/assets/js bootstrap occupies all three dir's jquery only occupies the js dir ok now my question... why am I gettign this error ? [INFO] Started Jetty Server 2014-10-06 22:29:29.169:WARN::/pphl/ org.apache.shiro.subject.ExecutionException: java.lang.RuntimeException: Exception constructing service 'ModuleManager': Error invoking service contribution method org.ap ache.tapestry5.modules.JavaScriptModule.setupBaseModules(MappedConfiguration, Resource, Resource, Resource, Resource, Resource): Unable to locate asset 'context:assets/js /transition.js' (the file does not exist). at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:385) at org.tynamo.security.services.impl.SecurityConfiguration.service(SecurityConfiguration.java:54) at $HttpServletRequestFilter_87e0f268550.service(Unknown Source) its complaining about Transition.js but I built Transition.js into my bootstrap min.js file above using the node.js platform and the routine that t-5.4-beta-22 is seeking the name of the javascript module by filename when I compiled it into a min.js file do you follow me ? How can I get t-5.4-beta-22 to be ok with my dropped in bootstrap built files ? Here is my config...thanks for any clarification @Contribute(SymbolProvider.class) @ApplicationDefaults public static void provideSymbols(MappedConfiguration configuration) { // locate them at src/main/webapp/assets/bootstrap/ configuration.add(SymbolConstants.BOOTSTRAP_ROOT, "context:assets"); configuration.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery"); } Best regards and thanks... KEN - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org