Re: Best practices to trigger serverside event methods from javascript?
OK I see. I could potentially encode all possible parameters for the draggables and droppables already on the serverside and then append them in javascript to the base URL. That would work in my case. However if the parameters are also dynamic and change in the browser, I'm out of luck with this approach. Seems to me like a clientside encoder is missing. Then it would be possible to generate the baseURL on the server and add whatever the client is coming up with as parameters. On Mon, May 25, 2009 at 6:05 AM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: I believe the URLEncoder can help here if I'm not mistaken, this obviously limit you to server side generation of the url parameters. Just: @Inject private URLEncoder urlEncoder; in your methods urlEncoder.encode(whatever=youwant); Haven't tested this and just got it from the api. Should work I guess. Good luck, Joost On Mon, May 25, 2009 at 2:58 AM, Markus Joschko markus.josc...@gmail.com wrote: But then you loose the special encoding tapestry does e.g for the = sign, or? On Sun, May 24, 2009 at 12:07 AM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: I personally prefer generating an eventlink and adding the parameters the normal tapestry way. Then Tapestry will take care of everything for you. So still only generate one Link (pageOrComponentUrl:eventName) and append the parameters server side and pass them using RenderSupport.addScript() or append the params client side. eg: pageOrComponentUrl:eventName/StringVar1/LongVar2 on your page: @OnEvent(value = eventName) private Object handleEvent(String var1, Long var2) { ...do stuff and return JSON/Block/null/Page class/Link/String url... } or if the params can be of many different configurations @OnEvent(value = eventName) private Object handleEvent(EventContext context) { ...do stuff and return JSON/Block/null/Page class/Link/String url... } Cheers, Joost On Sun, May 24, 2009 at 9:19 AM, Markus Joschko markus.josc...@gmail.com wrote: Thanks, never thought about normal parameters. I then probably need to do the coercionstuff on my own. I guess there is a service I can use for that. However it still feels like hack. On Sat, May 23, 2009 at 10:06 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Sat, 23 May 2009 16:17:11 -0300, Markus Joschko markus.josc...@gmail.com escreveu: But that does not scale very well. Only 10 draggables and 10 droppables would result into 100 potential links that I need to render just in case. And if you have to deal with 100 draggables this gets really ugly. So generate a single link that will have query parameters on them (/page/event?x=1y=2). ;) To get the parameters, @Inject the Request service. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Versioning assets
Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut
[Tapestry Central] Tapestry Road Show: Ann Arbor, Michigan
This week, I'll be in Ann Arbor, MI to do a bit (aka, four grueling days) of on-site Tapestry training. If you're in Ann Arbor and would like to get together for a drink and a chat about Tapestry, Open Source, or anything along those lines, please drop a line! -- Posted By Howard to Tapestry Central at 5/24/2009 07:05:00 PM
Re: Versioning assets
Hi, you may increment your build number by one, and use the Application version symbol. configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); the version is part of the path to the assets. Borut Bolčina schrieb: Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Versioning assets
Hello, 2009/5/25 Christian Senk senk.christ...@googlemail.com Hi, you may increment your build number by one, and use the Application version symbol. configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); Where do I put this line? the version is part of the path to the assets. So, if I now have src/main/webapp/css/my.css I must create src/main/webapp/css/0.0.7/my.css Is this correct? What about href in my layout component? It looks like this now: link rel=stylesheet type=text/css href=${asset:context:css/my.css} / I want to avoid modifying templates and code in multiple places when css changes. Is this possible? Thanks, Borut Borut Bolčina schrieb: Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Versioning assets
You put this line into the contribution method for the Application Defaults in your Tapestry-module. For example: public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, en,de); configuration.add(SymbolConstants.PRODUCTION_MODE, false); //Application Version configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); } And thats all what you have to do. Tapestry automatically does everything for you. If you don't have this line until now, tapestry replaced the version in the path with a generated hex-string. An example path could look like: /app/assets/ctx/0.0.7/styles/style.css In your case, you have the following: src/main/webapp/css/my.css and with the versioning line in the browser it looks like: /app/assets/ctx/0.0.7/css/my.css you don't have to create folders for that. And don't bother about your templates asset:context do all this stuff automatically for you. Hope i explained it good enough ^.^ Borut Bolčina schrieb: Hello, 2009/5/25 Christian Senk senk.christ...@googlemail.com Hi, you may increment your build number by one, and use the Application version symbol. configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); Where do I put this line? the version is part of the path to the assets. So, if I now have src/main/webapp/css/my.css I must create src/main/webapp/css/0.0.7/my.css Is this correct? What about href in my layout component? It looks like this now: link rel=stylesheet type=text/css href=${asset:context:css/my.css} / I want to avoid modifying templates and code in multiple places when css changes. Is this possible? Thanks, Borut Borut Bolčina schrieb: Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Versioning assets
Thanks Christian but I am using T 5.0.18 and SymbolConstants.APPLICATION_VERSION is not available. Upgrade to 5.1 is not an option as we are using tapestry-spring-security which is not yet compatible with 5.1 So, how to do it in 5.0.18? -Borut 2009/5/25 Christian Senk senk.christ...@googlemail.com You put this line into the contribution method for the Application Defaults in your Tapestry-module. For example: public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, en,de); configuration.add(SymbolConstants.PRODUCTION_MODE, false); //Application Version configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); } And thats all what you have to do. Tapestry automatically does everything for you. If you don't have this line until now, tapestry replaced the version in the path with a generated hex-string. An example path could look like: /app/assets/ctx/0.0.7/styles/style.css In your case, you have the following: src/main/webapp/css/my.css and with the versioning line in the browser it looks like: /app/assets/ctx/0.0.7/css/my.css you don't have to create folders for that. And don't bother about your templates asset:context do all this stuff automatically for you. Hope i explained it good enough ^.^ Borut Bolčina schrieb: Hello, 2009/5/25 Christian Senk senk.christ...@googlemail.com Hi, you may increment your build number by one, and use the Application version symbol. configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); Where do I put this line? the version is part of the path to the assets. So, if I now have src/main/webapp/css/my.css I must create src/main/webapp/css/0.0.7/my.css Is this correct? What about href in my layout component? It looks like this now: link rel=stylesheet type=text/css href=${asset:context:css/my.css} / I want to avoid modifying templates and code in multiple places when css changes. Is this possible? Thanks, Borut Borut Bolčina schrieb: Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Versioning assets
Sorry Borut, doesn't pay attention at the tapestry version ^.^ Mayby this can help you, look at the end of this page: http://tapestry.apache.org/tapestry5/cookbook/lib.html there is a short chapter about versioning assets :) I think this way already exists in 5.0.18 Borut Bolčina schrieb: Thanks Christian but I am using T 5.0.18 and SymbolConstants.APPLICATION_VERSION is not available. Upgrade to 5.1 is not an option as we are using tapestry-spring-security which is not yet compatible with 5.1 So, how to do it in 5.0.18? -Borut 2009/5/25 Christian Senk senk.christ...@googlemail.com You put this line into the contribution method for the Application Defaults in your Tapestry-module. For example: public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { configuration.add(SymbolConstants.SUPPORTED_LOCALES, en,de); configuration.add(SymbolConstants.PRODUCTION_MODE, false); //Application Version configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); } And thats all what you have to do. Tapestry automatically does everything for you. If you don't have this line until now, tapestry replaced the version in the path with a generated hex-string. An example path could look like: /app/assets/ctx/0.0.7/styles/style.css In your case, you have the following: src/main/webapp/css/my.css and with the versioning line in the browser it looks like: /app/assets/ctx/0.0.7/css/my.css you don't have to create folders for that. And don't bother about your templates asset:context do all this stuff automatically for you. Hope i explained it good enough ^.^ Borut Bolčina schrieb: Hello, 2009/5/25 Christian Senk senk.christ...@googlemail.com Hi, you may increment your build number by one, and use the Application version symbol. configuration.add(SymbolConstants.APPLICATION_VERSION, 0.0.7); Where do I put this line? the version is part of the path to the assets. So, if I now have src/main/webapp/css/my.css I must create src/main/webapp/css/0.0.7/my.css Is this correct? What about href in my layout component? It looks like this now: link rel=stylesheet type=text/css href=${asset:context:css/my.css} / I want to avoid modifying templates and code in multiple places when css changes. Is this possible? Thanks, Borut Borut Bolčina schrieb: Hello, we have a T5.0.18 in production. Now I want to deliver changed CSS to all existing users, so there must be a way of versioning CSS and other assests. There is nothing at http://tapestry.apache.org/tapestry5/guide/assets.htmlabout versioning, although I think this functionality exists. Can someone point me to an example of how to organize and configure my app to handle versioned assets? Do I have to create different directories etc? -Borut - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best practices to trigger serverside event methods from javascript?
I believe the encoding is fairly simple and shouldn't be too hard to do on the client. if there is a wider need for it, you could consider proposing a patch to the tapestry.js Good luck, Joost On Mon, May 25, 2009 at 7:04 PM, Markus Joschko markus.josc...@gmail.com wrote: OK I see. I could potentially encode all possible parameters for the draggables and droppables already on the serverside and then append them in javascript to the base URL. That would work in my case. However if the parameters are also dynamic and change in the browser, I'm out of luck with this approach. Seems to me like a clientside encoder is missing. Then it would be possible to generate the baseURL on the server and add whatever the client is coming up with as parameters. On Mon, May 25, 2009 at 6:05 AM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: I believe the URLEncoder can help here if I'm not mistaken, this obviously limit you to server side generation of the url parameters. Just: @Inject private URLEncoder urlEncoder; in your methods urlEncoder.encode(whatever=youwant); Haven't tested this and just got it from the api. Should work I guess. Good luck, Joost On Mon, May 25, 2009 at 2:58 AM, Markus Joschko markus.josc...@gmail.com wrote: But then you loose the special encoding tapestry does e.g for the = sign, or? On Sun, May 24, 2009 at 12:07 AM, Joost Schouten (mailing lists) joost...@jsportal.com wrote: I personally prefer generating an eventlink and adding the parameters the normal tapestry way. Then Tapestry will take care of everything for you. So still only generate one Link (pageOrComponentUrl:eventName) and append the parameters server side and pass them using RenderSupport.addScript() or append the params client side. eg: pageOrComponentUrl:eventName/StringVar1/LongVar2 on your page: @OnEvent(value = eventName) private Object handleEvent(String var1, Long var2) { ...do stuff and return JSON/Block/null/Page class/Link/String url... } or if the params can be of many different configurations @OnEvent(value = eventName) private Object handleEvent(EventContext context) { ...do stuff and return JSON/Block/null/Page class/Link/String url... } Cheers, Joost On Sun, May 24, 2009 at 9:19 AM, Markus Joschko markus.josc...@gmail.com wrote: Thanks, never thought about normal parameters. I then probably need to do the coercionstuff on my own. I guess there is a service I can use for that. However it still feels like hack. On Sat, May 23, 2009 at 10:06 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Sat, 23 May 2009 16:17:11 -0300, Markus Joschko markus.josc...@gmail.com escreveu: But that does not scale very well. Only 10 draggables and 10 droppables would result into 100 potential links that I need to render just in case. And if you have to deal with 100 draggables this gets really ugly. So generate a single link that will have query parameters on them (/page/event?x=1y=2). ;) To get the parameters, @Inject the Request service. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[5.1.0.5] Ars-Machina - No service Implements the interface org.hibernate.SessionFactory
Hi all , I´m trying to use te modules Ars-Machina generic-dao generic-dao-hibernate, but i´m getting the following message : * No service implements the interface org.hibernate.SessionFactory* I attach my current pom.xml, the following are the unique dependencies from the ars-machina project. ... dependency groupIdbr.com.arsmachina/groupId artifactIdgeneric-dao/artifactId version${ars-machina-release-version}/version /dependency dependency groupIdbr.com.arsmachina/groupId artifactIdgeneric-dao-hibernate/artifactId version${ars-machina-release-version}/version /dependency ... ( ...with ars-machina-release-version1.0/ars-machina-release-version ...) ¿ Any addicional dependency for get working ? I will try making my own builder method that returns an instance of SessionFactory, getting the instance from one of the services provided the tapestry-hibernate module. Thanks Nice.Day Antonio project xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns=http://maven.apache.org/POM/4.0.0; modelVersion4.0.0/modelVersion groupIdorg.jwp/groupId artifactIdt5lab/artifactId version0.0.1-SNAPSHOT/version packagingwar/packaging nameic20 Tapestry 5 Application/name dependencies dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-core/artifactId version${tapestry-release-version}/version /dependency dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version /dependency dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-upload/artifactId version${tapestry-release-version}/version /dependency !-- dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-fileupload/artifactId version${tapestry-release-version}/version /dependency -- !-- A dependency on either JUnit or TestNG is required, or the surefire plugin (which runs the tests) will fail, preventing Maven from packaging the WAR. Tapestry includes a large number of testing facilities designed for use with TestNG (http://testng.org/), so it's recommended. -- dependency groupIdorg.testng/groupId artifactIdtestng/artifactId version5.8/version classifierjdk15/classifier scopetest/scope /dependency dependency groupIdorg.easymock/groupId artifactIdeasymock/artifactId version2.4/version scopetest/scope /dependency !-- May conflict with RunJettyRun inside Eclipse. tapestry-test brings in Selenium, which is based on Jetty 5.1; RunJettyRun uses Jetty 6. -- dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-test/artifactId version${tapestry-release-version}/version scopetest/scope /dependency !-- Provided by the servlet container, but sometimes referenced in the application code. -- dependency groupIdjavax.servlet/groupId artifactIdservlet-api/artifactId version2.5/version scopeprovided/scope /dependency !-- MYSQL Jdbc Driver -- dependency groupIdmysql/groupId artifactIdmysql-connector-java/artifactId version5.1.6/version /dependency !-- Chenillekit : Services and Components Library -- dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-tapestry/artifactId version${chenillekit-release-version}/version /dependency dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-mail/artifactId version${chenillekit-release-version}/version /dependency dependency groupIdorg.chenillekit/groupId artifactIdchenillekit-hibernate/artifactId version${chenillekit-release-version}/version /dependency !-- Hibernate-Tools -- dependency groupIdorg.hibernate/groupId artifactIdhibernate-tools/artifactId version3.2.0.ga/version /dependency dependency groupIdbr.com.arsmachina/groupId artifactIdgeneric-dao/artifactId version${ars-machina-release-version}/version /dependency dependency groupIdbr.com.arsmachina/groupId artifactIdgeneric-dao-hibernate/artifactId version${ars-machina-release-version}/version /dependency /dependencies build finalNameic20/finalName plugins plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-compiler-plugin/artifactId
Re: [5.1.0.5] Ars-Machina - No service Implements the interface org.hibernate.SessionFactory
On Mon, May 25, 2009 at 6:58 AM, GMAIL1 amiguel.fernan...@gmail.com wrote: Hi all , Hi! I´m trying to use te modules Ars-Machina generic-dao generic-dao-hibernate, but i´m getting the following message : Nice to see that someone besides me is using the Ars Machina Project packages. :) No service implements the interface org.hibernate.SessionFactory* These packages don't have a dependency on Tapestry-IoC, so they don't provide a SessionFactory service to T-IoC. Any addicional dependency for get working ? I will try making my own builder method that returns an instance of SessionFactory, getting the instance from one of the services provided the tapestry-hibernate module. I've never used Tapestry-Hibernate myself, but I guess that'll work. :) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
tapestry-spring-security dynamic failure url
Hi, using tapestry-spring-security 2.0.1 one can contribute public static void contributeApplicationDefaults(MappedConfigurationString, String configuration) { ... configuration.add(spring-security.failure.url, /login/failed); ... } and therefore override the factory default set in SecurityModule public static void contributeFactoryDefaults( final MappedConfigurationString, String configuration) { ... configuration.add(spring-security.failure.url, /loginfailed); ... } I need to configure AuthenticationProcessingFilter on the fly. Can I inject the filter and call the setAuthenticationFailureUrl(failureUrl) in my page class? I want to have different failureUrl based on some condition. Cheers, Borut P.S. How far is tapestry-spring-security from being T5.1 compatible?
[Tapestry Central] Tapestry Clojure @ Portland Code Camp
Portland Code Camp is a local (in Portland) free conference on development tools and languages ... and it's coming up fast (this Saturday). I'll most likely be talking about Tapestry and Clojure ... I actually won't know until they make their last minute session selection tomorrow (it's based on how many attendees express interest). If you're in the Portland area and want to learn a bit more about Tapestry or Clojure, sign up and vote! -- Posted By Howard to Tapestry Central at 5/25/2009 07:48:00 AM
Re: [5.1.0.5] Ars-Machina - No service Implements the interface org.hibernate.SessionFactory
Hi again, I tried adding the following builder method : public static SessionFactory buildSessionFactory(final HibernateSessionManager hibernateSessionManager) { return hibernateSessionManager.getSession().getSessionFactory(); } And T5 returns ... throwables * org.hibernate.HibernateException: No CurrentSessionContext configured! Stack trace * org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:572) * $SessionFactory_1217831619b.getCurrentSession($SessionFactory_1217831619b.java) * br.com.arsmachina.dao.hibernate.BaseHibernateDAO.getSession(BaseHibernateDAO.java:111) * br.com.arsmachina.dao.hibernate.ReadableDAOImpl.createCriteria(ReadableDAOImpl.java:267) * br.com.arsmachina.dao.hibernate.ReadableDAOImpl.findAll(ReadableDAOImpl.java:125) * br.com.arsmachina.dao.hibernate.GenericDAOImpl.findAll(GenericDAOImpl.java:94) * $UserDAO_1217831614a.findAll($UserDAO_1217831614a.java) I attached my custom implementations of the package br.com.arsmachina.dao.hibernate , now i have working ars-machina.generic-dao-hibernate and tapestry-hibernate modules together . A few changes in BaseHibernateDAO : - Replaced the import of class org.hibernate.classic.Session with org.hibernate.Session. - Add the org.hibernate.Session object as a new paremeter in all the constructor methods. - Changes in class BaseHibernateDAO : Add new field of type org.hibernate.Session, that will be initialized inside the constructor ( like the SessionFactory does ) Modify the method getSession(), returning the new field reference By this way, the SessionFactory is Only used for his specific purposes and the Session is provided directly by the HibernateSessionManager service from tapestry-hibernate. That´s all , any suggestions, opinions.. Nice evening ! Antonio Thiago H. de Paula Figueiredo escribió: On Mon, May 25, 2009 at 6:58 AM, GMAIL1 amiguel.fernan...@gmail.com wrote: Hi all , Hi! I´m trying to use te modules Ars-Machina generic-dao generic-dao-hibernate, but i´m getting the following message : Nice to see that someone besides me is using the Ars Machina Project packages. :) No service implements the interface org.hibernate.SessionFactory* These packages don't have a dependency on Tapestry-IoC, so they don't provide a SessionFactory service to T-IoC. Any addicional dependency for get working ? I will try making my own builder method that returns an instance of SessionFactory, getting the instance from one of the services provided the tapestry-hibernate module. I've never used Tapestry-Hibernate myself, but I guess that'll work. :) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [5.1.0.5] Ars-Machina - No service Implements the interface org.hibernate.SessionFactory
Em Mon, 25 May 2009 12:43:17 -0300, Antonio Fernández amiguel.fernan...@gmail.com escreveu: Hi again, Hi! * org.hibernate.HibernateException: No CurrentSessionContext configured! The suggested way is to override getSession() to return something other than sessionFactory.getSession() or set a CurrentSessionContext in you SessionFactory (recommended). This section in the Hibernate documentation tells you why and how: http://docs.jboss.org/hibernate/stable/core/reference/en/html_single/#architecture-current-session. A few changes in BaseHibernateDAO : - Replaced the import of class org.hibernate.classic.Session with org.hibernate.Session. Thanks for pointing me that. I've just fixed this in the Generic DAO-Hibernate branch. By the way, in the Maven repository, there is an improved 1.1 version there. - Add the org.hibernate.Session object as a new paremeter in all the constructor methods. - Changes in class BaseHibernateDAO : Add new field of type org.hibernate.Session, that will be initialized inside the constructor ( like the SessionFactory does ) Modify the method getSession(), returning the new field reference These modifications aren't appropriate to *Generic* DAO-Hibernate, as they wouldn't work without Tapestry-IoC (for example, when you're building a desktop application or using Spring), and this package is meant to be independetly from Tapestry-IoC. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
tapestry xpath and t: namespace
First off, I love the new xpath project. Unit testing components and pages is a lot easier because of it. One thing that would make life even better is if I have a way to tell tapestry to print out all t: namespace params in the output xhtml (for testing purposes). Targeting specific components on a page will be made a lot easier. Does such a setting exist? Thanks, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
missing key fail level
Hi, Is there a way to make tapestry throw an exception when it encounters a missing key? I would prefer this over the silent printing of the missing key message on the page. If an exception is thrown my unit tests will pick up the incorrect rendering of the component/page in stead of me having to go through my whole app after making change to the properties files. Cheers, Joost - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Missing maven dependency for tapx-datefield?
Hi All, I am having a problem trying to add the tapx-datefield artifact a Tapestry 5.0.18 project. More specifically, I have added the following to my pom.xml: dependency groupIdcom.formos.tapestry/groupId artifactIdtapx-datefield/artifactId version1.0.0-SNAPSHOT/version /dependency Maven fails while trying to resolve a tapestry360-project dependency, for which this artifact appears to rely on. The error itself appears as follows: [WARNING] An error occurred during dependency resolution of the following artifact: com.formos.tapestry:tapx-datefield1.0.0-SNAPSHOT Caused by: Unable to get dependency information: Unable to read the metadata file for artifact 'com.formos.tapestry:tapx-datefield:jar': Cannot find parent: com.formos.tapestry:tapestry360-project for project: com.formos.tapestry:tapx-project:pom:1.0.0-SNAPSHOT for project com.formos.tapestry:tapx-project:pom:1.0.0-SNAPSHOT com.formos.tapestry:tapx-datefield:jar:1.0.0-SNAPSHOT I looked through the snapshot repository at http://tapestry.formos.com/maven-snapshot-repository, and found no such artifact. Any insight would be greatly appreciated. Thanks, Eric
Re: Browser feature to better support web frameworks
Tapestry-conversations supports multiple simultaneous conversations with the same page on different tabs: http://docs.codehaus.org/display/TRAILS/Conversations+in+Trails. Kalle On Fri, May 22, 2009 at 5:57 AM, Sebastian Hennebrueder use...@laliluna.dewrote: Hello, an idea came across my brain and I would like to invite you to give some feedback on this. Basically it is a browser feature which is missing. In most applications we cannot use the session because multiple tabs in the browser would influence each other. I illustrated the idea here. http://www.laliluna.de/blog/2009/05/19/browser_feature_request.html What do you think? -- Best Regards / Viele Gruesse Sebastian Hennebrueder --- Training for Java Persistence and Hibernate - http://www.laliluna.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Missing maven dependency for tapx-datefield?
as per: http://tapestry.formos.com/nightly/tapx/tapx-datefield/ tapx-datefield is built for use with Tapestry 5.1 and higher. cheers, Joost On Tue, May 26, 2009 at 11:42 AM, Eric Rogers puckgrab...@gmail.com wrote: Hi All, I am having a problem trying to add the tapx-datefield artifact a Tapestry 5.0.18 project. More specifically, I have added the following to my pom.xml: dependency groupIdcom.formos.tapestry/groupId artifactIdtapx-datefield/artifactId version1.0.0-SNAPSHOT/version /dependency Maven fails while trying to resolve a tapestry360-project dependency, for which this artifact appears to rely on. The error itself appears as follows: [WARNING] An error occurred during dependency resolution of the following artifact: com.formos.tapestry:tapx-datefield1.0.0-SNAPSHOT Caused by: Unable to get dependency information: Unable to read the metadata file for artifact 'com.formos.tapestry:tapx-datefield:jar': Cannot find parent: com.formos.tapestry:tapestry360-project for project: com.formos.tapestry:tapx-project:pom:1.0.0-SNAPSHOT for project com.formos.tapestry:tapx-project:pom:1.0.0-SNAPSHOT com.formos.tapestry:tapx-datefield:jar:1.0.0-SNAPSHOT I looked through the snapshot repository at http://tapestry.formos.com/maven-snapshot-repository, and found no such artifact. Any insight would be greatly appreciated. Thanks, Eric - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
@CommitAfter rollback propagation
A quick question about tapestry-hibernate rollback propagation. As far as i know, any function annotated with @CommitAfter will create a new transaction similar to EJB required_new. But how would the nested functions behave? For eg. @CommitAfter public void functionA() { functionB(); } @CommitAfter public void functionB() {} If functionB failed to commit: 1) Will functionA be rollback? 2) Or will functionA be commited under another new transaction regardless of functionB? -- View this message in context: http://www.nabble.com/%40CommitAfter-rollback-propagation-tp23716428p23716428.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: @CommitAfter rollback propagation
@CommitAfter commits the transaction of the request. The transaction is created when the session is attached to the request. When functionB() is called the transaction will be committed and a new one will be created. So functionA() will commit the later transaction. On Tue, May 26, 2009 at 5:46 AM, sodium sodiu...@yahoo.com wrote: A quick question about tapestry-hibernate rollback propagation. As far as i know, any function annotated with @CommitAfter will create a new transaction similar to EJB required_new. But how would the nested functions behave? For eg. @CommitAfter public void functionA() { functionB(); } @CommitAfter public void functionB() {} If functionB failed to commit: 1) Will functionA be rollback? 2) Or will functionA be commited under another new transaction regardless of functionB? -- View this message in context: http://www.nabble.com/%40CommitAfter-rollback-propagation-tp23716428p23716428.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Best regards, Igor Drobiazko