Re: T4.1.2: problems with async EventListener
Hello, Is it a cache problem? Try to delete your cache, cookies, etc. Proxy cache if applicable, etc. thought that as well, but it wasn't. It turns out that IE does not like it if you try to update nested dom-elements, e.g. div id=1 [something here] div id=2 [something more here] /div /div if one updates 2 and 1 in the same response, IE seems to ignore it completely... Regards, Patrick At least the first problem you had sounds like cache inconsistency Patrick Klein wrote: Hallo, strange... after letting it be for a few days and retrying today it works :| Now another problem has arisen: The whole thing works fine using firefox but nothing works with internet explorer. i've got eventlisteners for property selections. i can see that the listeners in the java class are called, but nothing happens on the IE side. These events should modify input TextFields as well as PropertySelections but nothing goes through to the shown page. Could anyone help me out here on how to make it work? Regards, Patrick Hi! I just tried to switch over to Tapestry 4.1.2 and use the EventListeners and AJAX functionality. However, as soon as i add an EventListener to any page-class file i get the following log output: 02.07.2007 15:46:00 org.apache.tapestry.asset.AssetService service WARNUNG: Classpath resource '/tapestry/event.js' does not exist. 02.07.2007 15:46:00 org.apache.tapestry.error.RequestExceptionReporterImpl reportRequestException WARNUNG: Failure to export classpath resource /tapestry.js. org.apache.hivemind.ApplicationRuntimeException: Classpath resource '/tapestry.js' does not exist. at org.apache.tapestry.asset.ResourceDigestSourceImpl.computeMD5(ResourceDigestSourceImpl.java:96) at org.apache.tapestry.asset.ResourceDigestSourceImpl.getDigestForResource(ResourceDigestSourceImpl.java:64) at $ResourceDigestSource_1138787a9c0.getDigestForResource($ResourceDigestSource_1138787a9c0.java) at org.apache.tapestry.asset.AssetService.service(AssetService.java:221) at $IEngineService_1138787a8cc.service($IEngineService_1138787a8cc.java) at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72) at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:237) at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54) at $WebRequestServicer_1138787a891.service($WebRequestServicer_1138787a891.java) at $WebRequestServicer_1138787a88d.service($WebRequestServicer_1138787a88d.java) at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61) at $ServletRequestServicer_1138787a87f.service($ServletRequestServicer_1138787a87f.java) at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55) at $ServletRequestServicerFilter_1138787a87b.service($ServletRequestServicerFilter_1138787a87b.java) at $ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java) at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52) at $ServletRequestServicerFilter_1138787a879.service($ServletRequestServicerFilter_1138787a879.java) at $ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java) at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53) at $ServletRequestServicerFilter_1138787a87d.service($ServletRequestServicerFilter_1138787a87d.java) at $ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java) at $ServletRequestServicer_1138787a873.service($ServletRequestServicer_1138787a873.java) at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126) at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.biso.tomcat.filter.PerformanceFilter.doFilter(PerformanceFilter.java:42) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at clime.messadmin.filter.MessAdminFilter.doFilter(MessAdminFilter.java:104) at
Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter
Great find! People may need to deploy on JDK 1.5 to see if that's the underlying cause. I wonder if we could create a work around by setting a wait time to acquire the read lock? In a loop? On 7/10/07, Ben Sommerville [EMAIL PROTECTED] wrote: If you are running under jdk 6u1 and tapestry 5.0.5 (or greater) then there is a jvm bug that can cause a deadlock. The bug report is at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571733. It is supposed to be fixed in jdk 6u2 (which was release recently) but I haven't had a chance to test it yet. cheers Ben -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 9:06 AM To: Tapestry users Subject: Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter The NPE seems to be caused by a missing t:formdata request parameter. I just reproduced this (weird) situation by removing the hidden form field t:formdata with firebug, so that I could produce the NPE. Although, following request went through well, and the number of request processing threads did not increase. So there seems to be no (direct) interrelationship between the NPE and the locked threads. Cheers, Martin On Tue, 2007-07-10 at 23:43 +0200, Martin Grotzke wrote: Hi, we had an issue with our deployed application that did not respond anymore. This happened two or three times in the last 4 days, but I was not able to reproduce it until now. The analysis of the logs showed, that there was a NPE in Base64InputStream, and afterwards the application did not respond anymore. When I triggered a thread dump, all 200 tomcat threads were in status WAITING, like this one: http-9090-1 daemon prio=10 tid=0x2aaaf7e1fc00 nid=0x3f05 waiting on condition [0x4459e000..0x4459fbc0] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0x2aaab8228360 (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndC heckInterrupt(AbstractQueuedSynchronizer.java:712) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquir eShared(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireS hared(AbstractQueuedSynchronizer.java:1162) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.loc k(ReentrantReadWriteLock.java:594) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRe ad(ConcurrentBarrier.java:70) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.se rvice(CheckForUpdatesFilter.java:110) at $RequestHandler_1139c29ae4a.service($RequestHandler_1139c29ae4a.java) at $RequestHandler_1139c29ae41.service($RequestHandler_1139c29ae41.java) at org.apache.tapestry.services.TapestryModule$11.service(Tapestr yModule.java:1044) at $HttpServletRequestHandler_1139c29ae40.service($HttpServletReq uestHandler_1139c29ae40.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint. java:447) at java.lang.Thread.run(Thread.java:619) I'm not sure if the NPE that happened before is the reason for this, as I don't see the relationship between both issues (apart from the correlation of events/time). Hopefully someone closer to the code can have a look at this and tell what's the problem here? Then I'd like to submit a bug report / help fixing(?)... More output of the logs you find at the end of this email. Thanx a lot in advance, cheers, Martin [INFO ] 2007-07-09 11:56:35,513 TP-Processor1 org.comp.proj.search.presentation.pages.Search.onActivate:
RE: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter
One work around that I found is to create the read/write lock in ConcurrentBarrier in fair mode instead of the default mode. (fair mode changes the algorithm used to decide which thread gets the lock next) That worked for me but subjectively things seemed a little slower (no actual measurement so take that for what it is worth) If it is fixed in 6u2 then I'd be tempted just to document the problem with 6u1 :) cheers Ben PS: I'll try to actually confirm that is it fixed in the next few days... may not get to it till the weekend tho -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 4:14 PM To: Tapestry users Subject: Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter Great find! People may need to deploy on JDK 1.5 to see if that's the underlying cause. I wonder if we could create a work around by setting a wait time to acquire the read lock? In a loop? On 7/10/07, Ben Sommerville [EMAIL PROTECTED] wrote: If you are running under jdk 6u1 and tapestry 5.0.5 (or greater) then there is a jvm bug that can cause a deadlock. The bug report is at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571733. It is supposed to be fixed in jdk 6u2 (which was release recently) but I haven't had a chance to test it yet. cheers Ben -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 9:06 AM To: Tapestry users Subject: Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter The NPE seems to be caused by a missing t:formdata request parameter. I just reproduced this (weird) situation by removing the hidden form field t:formdata with firebug, so that I could produce the NPE. Although, following request went through well, and the number of request processing threads did not increase. So there seems to be no (direct) interrelationship between the NPE and the locked threads. Cheers, Martin On Tue, 2007-07-10 at 23:43 +0200, Martin Grotzke wrote: Hi, we had an issue with our deployed application that did not respond anymore. This happened two or three times in the last 4 days, but I was not able to reproduce it until now. The analysis of the logs showed, that there was a NPE in Base64InputStream, and afterwards the application did not respond anymore. When I triggered a thread dump, all 200 tomcat threads were in status WAITING, like this one: http-9090-1 daemon prio=10 tid=0x2aaaf7e1fc00 nid=0x3f05 waiting on condition [0x4459e000..0x4459fbc0] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0x2aaab8228360 (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndC heckInterrupt(AbstractQueuedSynchronizer.java:712) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquir eShared(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireS hared(AbstractQueuedSynchronizer.java:1162) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.loc k(ReentrantReadWriteLock.java:594) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRe ad(ConcurrentBarrier.java:70) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.se rvice(CheckForUpdatesFilter.java:110) at $RequestHandler_1139c29ae4a.service($RequestHandler_1139c29ae4a.java) at $RequestHandler_1139c29ae41.service($RequestHandler_1139c29ae41.java) at org.apache.tapestry.services.TapestryModule$11.service(Tapestr yModule.java:1044) at $HttpServletRequestHandler_1139c29ae40.service($HttpServletReq uestHandler_1139c29ae40.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:104) at
T4.1.2 error loading hivemind-service
hi, i am doing a simple test with the new version of tapestry (runs fine with 4.0.2): public class LoginTest extends TestCase { public void testService() { Registry registry = RegistryBuilder.constructDefaultRegistry(); AGLoginService service = (AGLoginService) registry.getService(AGLoginService.class); boolean isAdmin = false; ArrayListString ldapRoles = new ArrayListString(); ldapRoles.add(admin); String userName = dummyuser; String userPassword = xyz; service.authUser(userName, userPassword, ldapRoles, isAdmin); } } resulting in the following stacktrace using javassist-3.4.ga. i also tried to use an old version of javassist (3.0) wich doesnt work either... 09:00:59,239 DEBUG [ConfigurationPointImpl] Constructing extension point hivemind.ServiceModels org.apache.hivemind.ApplicationRuntimeException: Unable to create class $Runnable_113b414a9d1: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:130) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getService(SingletonServiceModel.java:57) at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:210) at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:223) at org.apache.hivemind.impl.RegistryInfrastructureImpl.getService(RegistryInfrastructureImpl.java:207) at org.apache.hivemind.impl.RegistryInfrastructureImpl.startup(RegistryInfrastructureImpl.java:434) at org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:154) at org.apache.hivemind.impl.RegistryBuilder.constructDefaultRegistry(RegistryBuilder.java:196) at de.freenet.pos.posDB.test.LoginTest.testService(LoginTest.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to create class $Runnable_113b414a9d1: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:89) at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:78) at org.apache.tapestry.enhance.AbstractFab.createClass(AbstractFab.java:91) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxyClass(SingletonServiceModel.java:185) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:102) ... 24 more Caused by: java.lang.NoSuchMethodError: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.tapestry.enhance.HiveMindClassPool.toClass(HiveMindClassPool.java:79) at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:85) ... 28 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter
Ben, thanx a lot for this info! We were running our app under jdk 6u1 and tapestry 5.0.5, so it's matching perfectly. I just installed jdk 6u2 on our test-system and started our app with this - so we'll see if it happens again. I'll give a feedback after say 5 days when our app is fine, or of course if this problem occurs again. Btw: it's very amazing communicating on this list, as there's so much useful and fast feedback - really great!! Thanx for now, cheers, Martin On Tue, 2007-07-10 at 19:52 -1000, Ben Sommerville wrote: If you are running under jdk 6u1 and tapestry 5.0.5 (or greater) then there is a jvm bug that can cause a deadlock. The bug report is at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571733. It is supposed to be fixed in jdk 6u2 (which was release recently) but I haven't had a chance to test it yet. cheers Ben -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 9:06 AM To: Tapestry users Subject: Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter The NPE seems to be caused by a missing t:formdata request parameter. I just reproduced this (weird) situation by removing the hidden form field t:formdata with firebug, so that I could produce the NPE. Although, following request went through well, and the number of request processing threads did not increase. So there seems to be no (direct) interrelationship between the NPE and the locked threads. Cheers, Martin On Tue, 2007-07-10 at 23:43 +0200, Martin Grotzke wrote: Hi, we had an issue with our deployed application that did not respond anymore. This happened two or three times in the last 4 days, but I was not able to reproduce it until now. The analysis of the logs showed, that there was a NPE in Base64InputStream, and afterwards the application did not respond anymore. When I triggered a thread dump, all 200 tomcat threads were in status WAITING, like this one: http-9090-1 daemon prio=10 tid=0x2aaaf7e1fc00 nid=0x3f05 waiting on condition [0x4459e000..0x4459fbc0] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0x2aaab8228360 (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndC heckInterrupt(AbstractQueuedSynchronizer.java:712) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquir eShared(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireS hared(AbstractQueuedSynchronizer.java:1162) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.loc k(ReentrantReadWriteLock.java:594) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRe ad(ConcurrentBarrier.java:70) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.se rvice(CheckForUpdatesFilter.java:110) at $RequestHandler_1139c29ae4a.service($RequestHandler_1139c29ae4a.java) at $RequestHandler_1139c29ae41.service($RequestHandler_1139c29ae41.java) at org.apache.tapestry.services.TapestryModule$11.service(Tapestr yModule.java:1044) at $HttpServletRequestHandler_1139c29ae40.service($HttpServletReq uestHandler_1139c29ae40.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint. java:447) at java.lang.Thread.run(Thread.java:619) I'm not sure if the NPE that happened before is the reason for this, as I don't see
Re: T5 howto tapestry-hibernate
that helped me a lot further! but now i have the problem that the entities are not found. aren't they automaticly picked up by tapestry-hibernate? this is my debug output: [INFO] Started Jetty Server [DEBUG] HibernateSessionManager Creating service 'HibernateSessionManager'. [DEBUG] Session Invoking method org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionManager, PropertyShadowBuilder) (at HibernateModule.java:84). [DEBUG] HibernateSessionSource Creating service 'HibernateSessionSource'. [DEBUG] HibernateSessionManager Invoking method org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62). [DEBUG] HibernateSessionSource Invoking method org.apache.tapestry.hibernate.HibernateModule.contributeHibernateSessionSource(Configuration, String) (at HibernateModule.java:51). [DEBUG] HibernateSessionSource Constructed configuration: [ org.czarlylab.javashop.entities] [DEBUG] HibernateSessionSource Invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35). [WARN] AnnotationBinder Package not found or wo package-info.java: org.czarlylab.javashop.entities [WARN] ConfigurationFactory No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Users/basti/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache- 1.2.3.jar!/ehcache-failsafe.xml [WARN] JDBCExceptionReporter SQL Warning: 1, SQLState: 01J01 [WARN] JDBCExceptionReporter Database 'JAVASHOP' not created, connection made to existing database instead. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.UpdateTimestampsCache]; using defaults. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.StandardQueryCache]; using defaults. [INFO] HibernateSessionSource Hibernate startup: 639 ms to configure, 5.196ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: 2007/7/11, 小司 [EMAIL PROTECTED]: You can see this http://linuxboy.javaeye.com/blog/68311 I learn from there . it works well. 2007/7/11, Sebastian Heyden [EMAIL PROTECTED]: hello folks, since some days i write my first application with tapestry and now i want to get tapestry-hibernate working. i really tried hard to find help in the mailing-list archiv and by googling. thats what i got so far: - a package called entities - Annotations on my Entity - hibernate, jta and hibernate-annotations in my classpath - hibernate.cfg.xml with connection details without mapping-files i simply tried @Inject Session session in a Hivemind Service but the session was null when i wanted to use it. do i have to register hibernate somehow in AppModule? thanks in advance, sebas -- 得与失都是生活
Re: T5 IoC: How to invoke a decorator method after the service method invoked
I tried the hint you gave me but it seems to be not working. Perhaps I am missing something. Let me paste the code snippets so there won't be any confusion. This is the AppModule: public class AppModule { public static void bind(ServiceBinder binder){ binder.bind(Decorator.class, DecoratorImpl.class); binder.bind(Service.class, ServiceImpl.class); binder.bind(AnotherService.class, AnotherServiceImpl.class); } public static Object decorateAnotherService( Object delegate, Service service, @InjectService(Decorator) Decorator decorator) { return decorator.decorate( delegate, service ); } } Basically I binded everything to their interface. What I want is to decorate AnotherService with Service and I want the execute method in Service to be invoked before and after any method in AnotherService is invoked. Which means before and after the AnotherService's run method is invoked, the Service's execute method is invoked. This is the ServiceImpl: public class ServiceImpl implements Service { public void execute() { log.debug(-- Inside Service method --); } } And this is the AnotherServiceImpl: public class AnotherServiceImpl implements AnotherService{ public void run(){ log.debug(Inside another service); } } This is the DecoratorImpl: public class DecoratorImpl implements Decorator { public Object decorate(Object delegate, Service service) { log.debug( Begin decorator ); Interceptor interceptor= new Interceptor(service); interceptor.execute(); log.debug( End decorator ); return service; } } And this is the Interceptor: public class Interceptor { private final Service service; public Interceptor(Service service) { this.service = service; } public void execute() { // Logic before delegate invocation here. log.debug( Before delegate ); service.execute(); // Logic after delegate invocation here. log.debug( After delegate ); } } I already did what you said by creating the Interceptor inside the Decorator and then execute the service method inside the Interceptor. But that didn't work, because the Service.execute() is still executed only before the AnotherService.run(). What have I gotten wrong here. Thanks in advance On 7/9/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: The decorator creates the interceptor. The interceptor has the same interface as the service. The decorator is passed the service, which it can then provide to the interceptor. It's called the delegate (because it may not be the service, it may be another interceptor, but that's actually not relevant). -- It's not just about coding, it's a matter of fulfilling you core being YM!: thejavafreak Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 howto tapestry-hibernate
additionaly i want to give you my hibernate.cfg.xml and the following exception hibernate-configuration session-factory property name=configurationClass org.hibernate.cfg.AnnotationConfiguration/property property name=connection.driver_class org.apache.derby.jdbc.EmbeddedDriver/property property name=hibernate.connection.urljdbc:derby:JAVASHOP;create=true /property property name=hibernate.connection.usernameAPP/property property name=hibernate.connection.password/property property name=hibernate.connection.pool_size10/property property name=show_sqltrue/property property name=dialectorg.hibernate.dialect.DerbyDialect/property property name=hibernate.hbm2ddl.autocreate/property !-- Cache Configurations -- !-- Using net.sf.ehcache.hibernate.SingletonEhCacheProvider instead of net.sf.ehcache.hibernate.EhCacheProvider ensures the same instance of CacheManager is referred to by both Hibernate and our JMX Agent simpleJpaHibernateApp.agents.jmxAgent. (Thanks to Greg Luck!) -- property name=hibernate.cache.use_minimal_putsfalse/property property name=hibernate.cache.use_query_cachetrue/property property name=hibernate.cache.use_second_level_cachetrue/property property name=hibernate.cache.use_structured_entriestrue/property property name=hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.cache.use_structured_entriesfalse/property /session-factory /hibernate-configuration --- [INFO] HibernateSessionSource Hibernate startup: 646 ms to configure, 4.904ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: [ERROR] BrowseCatalog Render queue error in SetupRender[BrowseCatalog: categorylist.loop]: Failure reading parameter source of component BrowseCatalog:categorylist.loop: Unknown entity: org.czarlylab.javashop.entities.Category 2007/7/11, Sebastian Heyden [EMAIL PROTECTED]: that helped me a lot further! but now i have the problem that the entities are not found. aren't they automaticly picked up by tapestry-hibernate? this is my debug output: [INFO] Started Jetty Server [DEBUG] HibernateSessionManager Creating service 'HibernateSessionManager'. [DEBUG] Session Invoking method org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionManager, PropertyShadowBuilder) (at HibernateModule.java:84). [DEBUG] HibernateSessionSource Creating service 'HibernateSessionSource'. [DEBUG] HibernateSessionManager Invoking method org.apache.tapestry.hibernate.HibernateModule.build(HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62). [DEBUG] HibernateSessionSource Invoking method org.apache.tapestry.hibernate.HibernateModule.contributeHibernateSessionSource(Configuration, String) (at HibernateModule.java:51). [DEBUG] HibernateSessionSource Constructed configuration: [ org.czarlylab.javashop.entities] [DEBUG] HibernateSessionSource Invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35). [WARN] AnnotationBinder Package not found or wo package-info.java: org.czarlylab.javashop.entities [WARN] ConfigurationFactory No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Users/basti/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache- 1.2.3.jar!/ehcache-failsafe.xml [WARN] JDBCExceptionReporter SQL Warning: 1, SQLState: 01J01 [WARN] JDBCExceptionReporter Database 'JAVASHOP' not created, connection made to existing database instead. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.UpdateTimestampsCache]; using defaults. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.StandardQueryCache]; using defaults. [INFO] HibernateSessionSource Hibernate startup: 639 ms to configure, 5.196 ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: 2007/7/11, 小司 [EMAIL PROTECTED]: You can see this http://linuxboy.javaeye.com/blog/68311 I learn from there . it works well. 2007/7/11, Sebastian Heyden [EMAIL PROTECTED]: hello folks, since some days i write my first application with tapestry and now i want to get tapestry-hibernate working. i really tried hard to find help in the mailing-list archiv and by googling. thats what i got so far: - a package called entities - Annotations on my Entity - hibernate, jta and hibernate-annotations in my classpath - hibernate.cfg.xml with connection details without mapping-files i simply tried @Inject Session session in a Hivemind Service but the session was null when i wanted to use it. do i have to register hibernate somehow in AppModule? thanks in advance, sebas -- 得与失都是生活
RE: Tap 4.1.2 Bug found ???
Bastian, please have a look at https://issues.apache.org/jira/browse/TAPESTRY-1556 . Maybe you can temporarily work around this by toying with your form-id and their specification on the EventListener annotation. Maybe you can add your problem with source-code, if possible, to that issue. That would definitively be helpful! Marcus -Original Message- From: Marcus Schulte [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 10, 2007 8:41 PM To: Tapestry users Subject: Re: Tap 4.1.2 Bug found ??? I think I've seen an issue connected to EventListener-wiring being fixed. I'll look it up tomorrow if the problem persists. 2007/7/10, Bastian Voigt [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, before I report a bug on this, I would like to hear some opinions since the bug is maybe difficult to describe and/or reproduce. I have written an AJAX component which makes use of the new EventListener api. This component is called VesselSuggest and is used in two different pages, called EditAlert and ImageUpload. In 4.1.1 this same component used to work, but since we upgraded to 4.1.2, the component works only on one of the two pages (actually , and on the other I get an error: org.apache.hivemind.ApplicationRuntimeException: No component found in tree for EventListener binding with a matching component id of ImageUpload/vesselSuggest.vesselSuggest. classpath:/com/vesseltracker/web/components/alerting/EditAlert.html,li ne13 As you might have noticed, it tries to wire a component from the page ImageUpload to the page EditAlert which is obviously wrong. Is it OK to report this as a tapestry bug, or does anyone have other suggestions? The stacktrace: org.apache.tapestry.pageload.EventConnectionVisitor.wireElementFormEve nts( EventConnectionVisitor.java:114) org.apache.tapestry.pageload.EventConnectionVisitor.visitComponent( EventConnectionVisitor.java:86) $IComponentVisitor_113b0099dbd.visitComponent($IComponentVisitor_113b0 099dbd.java) $IComponentVisitor_113b0099dbe.visitComponent($IComponentVisitor_113b0 099dbe.java) org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree( ComponentTreeWalker.java:45) org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree( ComponentTreeWalker.java:57) org.apache.tapestry.pageload.ComponentTreeWalker.walkComponentTree( ComponentTreeWalker.java:57) org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:655) $IPageLoader_113b0099da9.loadPage($IPageLoader_113b0099da9.java) $IPageLoader_113b0099daa.loadPage($IPageLoader_113b0099daa.java) org.apache.tapestry.pageload.PageSource.makeObject(PageSource.java:153 ) org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject( GenericKeyedObjectPool.java:797) org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:177) $IPageSource_113b0099d24.getPage($IPageSource_113b0099d24.java) org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:239 ) org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:226) $MyAlertsPage_103.getEditAlertPage($MyAlertsPage_103.java) com.vesseltracker.web.pages.MyAlertsPage.onAlert(MyAlertsPage.java:17) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j ava :39) sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMet hod( ListenerMethodInvokerImpl.java:276) org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerM ethod (ListenerMethodInvokerImpl.java:221) org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke ( ListenerMethodInvokerImpl.java:157) org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerM ethod (ListenerMethodInvokerImpl.java:80) org.apache.tapestry.listener.SyntheticListener.actionTriggered( SyntheticListener.java:52) org.apache.tapestry.binding.ListenerMethodBinding.actionTriggered( ListenerMethodBinding.java:77) org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener( ListenerInvokerTerminator.java:50) $ListenerInvoker_113b0099d1a.invokeListener($ListenerInvoker_113b0099d 1a.java) org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:101) org.apache.tapestry.engine.DirectService.triggerComponent( DirectService.java:166) org.apache.tapestry.engine.DirectService.service(DirectService.java:14 2) $IEngineService_113b0099d97.service($IEngineService_113b0099d97.java) org.apache.tapestry.services.impl.EngineServiceOuterProxy.service( EngineServiceOuterProxy.java:72) org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java: 237)
Re: T5 IoC: How to invoke a decorator method after the service method invoked
try this: delete clases Delegate and delegateImpl then change the interceptor: public class Interceptor implements AnotherService{ private final Service service; private final Log log; private final AnotherService delegate; public Interceptor(AnotherService delegate,Service service, Log log) { this.delegate = delegate; this.service = service; this.log = log; } public void run() { // Logic before delegate invocation here. log.info( Before delegate ); service.execute(); delegate.run(); service.execute(); // Logic after delegate invocation here. log.info( After delegate ); } } and change appmodule.decorateAnotherService public static AnotherService decorateAnotherService( Object delegate, Service service, Log log) { return new Interceptor((AnotherService)delegate, service, log ); } interceptor is an implementation of the service interface, you then code manualy method implementations, choosing when and how to call the delegate service. the code above outputed this to log: 11:28:28.390 INFO [SocketListener0-1] services.Interceptor.run( Interceptor.java:19) 52 Before delegate 11:28:28.390 INFO [SocketListener0-1] services.ServiceImpl.execute( ServiceImpl.java:14) 54 -- Inside Service method -- 11:28:28.390 INFO [SocketListener0-1] services.AnotherServiceImpl.run( AnotherServiceImpl.java:13) 53 Inside another service 11:28:28.390 INFO [SocketListener0-1] services.ServiceImpl.execute( ServiceImpl.java:14) 54 -- Inside Service method -- 11:28:28.390 INFO [SocketListener0-1] services.Interceptor.run( Interceptor.java:26) 52 After delegate Davor Hrg On 7/11/07, Joshua Jackson [EMAIL PROTECTED] wrote: I tried the hint you gave me but it seems to be not working. Perhaps I am missing something. Let me paste the code snippets so there won't be any confusion. This is the AppModule: public class AppModule { public static void bind(ServiceBinder binder){ binder.bind(Decorator.class, DecoratorImpl.class); binder.bind(Service.class, ServiceImpl.class); binder.bind(AnotherService.class, AnotherServiceImpl.class); } public static Object decorateAnotherService( Object delegate, Service service, @InjectService(Decorator) Decorator decorator) { return decorator.decorate( delegate, service ); } } Basically I binded everything to their interface. What I want is to decorate AnotherService with Service and I want the execute method in Service to be invoked before and after any method in AnotherService is invoked. Which means before and after the AnotherService's run method is invoked, the Service's execute method is invoked. This is the ServiceImpl: public class ServiceImpl implements Service { public void execute() { log.debug(-- Inside Service method --); } } And this is the AnotherServiceImpl: public class AnotherServiceImpl implements AnotherService{ public void run(){ log.debug(Inside another service); } } This is the DecoratorImpl: public class DecoratorImpl implements Decorator { public Object decorate(Object delegate, Service service) { log.debug( Begin decorator ); Interceptor interceptor= new Interceptor(service); interceptor.execute(); log.debug( End decorator ); return service; } } And this is the Interceptor: public class Interceptor { private final Service service; public Interceptor(Service service) { this.service = service; } public void execute() { // Logic before delegate invocation here. log.debug( Before delegate ); service.execute(); // Logic after delegate invocation here. log.debug( After delegate ); } } I already did what you said by creating the Interceptor inside the Decorator and then execute the service method inside the Interceptor. But that didn't work, because the Service.execute() is still executed only before the AnotherService.run(). What have I gotten wrong here. Thanks in advance On 7/9/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: The decorator creates the interceptor. The interceptor has the same interface as the service. The decorator is passed the service, which it can then provide to the interceptor. It's called the delegate (because it may not be the service, it may be another interceptor, but that's actually not relevant). -- It's not just about coding, it's a matter of fulfilling you core being YM!: thejavafreak Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 howto tapestry-hibernate
tapestry hibernate will pick it up if you follow the structure . myapp.entities myapp.pages myapp.components .. take a look at the error [WARN] AnnotationBinder Package not found or wo package-info.java: org.czarlylab.javashop.entities are you sure you have correct value in web.xml: param-nametapestry.app-package/param-name param-valueorg.czarlylab.javashop/param-value Davor Hrg On 7/11/07, Sebastian Heyden [EMAIL PROTECTED] wrote: additionaly i want to give you my hibernate.cfg.xml and the following exception hibernate-configuration session-factory property name=configurationClass org.hibernate.cfg.AnnotationConfiguration/property property name=connection.driver_class org.apache.derby.jdbc.EmbeddedDriver/property property name=hibernate.connection.urljdbc:derby:JAVASHOP;create=true /property property name=hibernate.connection.usernameAPP/property property name=hibernate.connection.password/property property name=hibernate.connection.pool_size10/property property name=show_sqltrue/property property name=dialectorg.hibernate.dialect.DerbyDialect/property property name=hibernate.hbm2ddl.autocreate/property !-- Cache Configurations -- !-- Using net.sf.ehcache.hibernate.SingletonEhCacheProvider instead of net.sf.ehcache.hibernate.EhCacheProvider ensures the same instance of CacheManager is referred to by both Hibernate and our JMX Agent simpleJpaHibernateApp.agents.jmxAgent. (Thanks to Greg Luck!) -- property name=hibernate.cache.use_minimal_putsfalse/property property name=hibernate.cache.use_query_cachetrue/property property name=hibernate.cache.use_second_level_cachetrue/property property name=hibernate.cache.use_structured_entriestrue/property property name=hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.cache.use_structured_entriesfalse/property /session-factory /hibernate-configuration --- [INFO] HibernateSessionSource Hibernate startup: 646 ms to configure, 4.904ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: [ERROR] BrowseCatalog Render queue error in SetupRender[BrowseCatalog: categorylist.loop]: Failure reading parameter source of component BrowseCatalog:categorylist.loop: Unknown entity: org.czarlylab.javashop.entities.Category 2007/7/11, Sebastian Heyden [EMAIL PROTECTED]: that helped me a lot further! but now i have the problem that the entities are not found. aren't they automaticly picked up by tapestry-hibernate? this is my debug output: [INFO] Started Jetty Server [DEBUG] HibernateSessionManager Creating service 'HibernateSessionManager'. [DEBUG] Session Invoking method org.apache.tapestry.hibernate.HibernateModule.build (HibernateSessionManager, PropertyShadowBuilder) (at HibernateModule.java:84). [DEBUG] HibernateSessionSource Creating service 'HibernateSessionSource'. [DEBUG] HibernateSessionManager Invoking method org.apache.tapestry.hibernate.HibernateModule.build (HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62). [DEBUG] HibernateSessionSource Invoking method org.apache.tapestry.hibernate.HibernateModule.contributeHibernateSessionSource (Configuration, String) (at HibernateModule.java:51). [DEBUG] HibernateSessionSource Constructed configuration: [ org.czarlylab.javashop.entities] [DEBUG] HibernateSessionSource Invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35). [WARN] AnnotationBinder Package not found or wo package-info.java: org.czarlylab.javashop.entities [WARN] ConfigurationFactory No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Users/basti/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache- 1.2.3.jar!/ehcache-failsafe.xml [WARN] JDBCExceptionReporter SQL Warning: 1, SQLState: 01J01 [WARN] JDBCExceptionReporter Database 'JAVASHOP' not created, connection made to existing database instead. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.UpdateTimestampsCache]; using defaults. [WARN] EhCacheProvider Could not find configuration [ org.hibernate.cache.StandardQueryCache]; using defaults. [INFO] HibernateSessionSource Hibernate startup: 639 ms to configure, 5.196 ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: 2007/7/11, 小司 [EMAIL PROTECTED]: You can see this http://linuxboy.javaeye.com/blog/68311 I learn from there . it works well. 2007/7/11, Sebastian Heyden [EMAIL PROTECTED]: hello folks, since some days i write my first application with tapestry and now i want to get tapestry-hibernate working. i really tried hard to find help in the mailing-list archiv and by googling. thats
Re: Tap 4.1.2 Bug found ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Bastian, please have a look at https://issues.apache.org/jira/browse/TAPESTRY-1556 . Maybe you can temporarily work around this by toying with your form-id and their specification on the EventListener annotation. I have temporarily worked around this bug by duplicating my component class. Maybe you can add your problem with source-code, if possible, to that issue. That would definitively be helpful! Hmm, it might be difficult to reproduce this bug in a testing application, but I will try if I find the time. - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlKVG9+lAHD7HULYRArDLAJoDU0itEWHLwEbZicVH0in0tT6j1ACcCP9G 1yZLAKNDF+ynVQSt5o+dsd8= =4cgs -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 4.1.2 Bug found ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As I see in JIRA, this bug should be fixed in 4.1.3 As it is quite a critical bug to us, what can we do to fix it? Would it make sense to patch against 4.1.2? How can I make such a patch? Regards Bastian Voigt Bastian Voigt wrote: [EMAIL PROTECTED] wrote: Bastian, please have a look at https://issues.apache.org/jira/browse/TAPESTRY-1556 . Maybe you can temporarily work around this by toying with your form-id and their specification on the EventListener annotation. I have temporarily worked around this bug by duplicating my component class. Maybe you can add your problem with source-code, if possible, to that issue. That would definitively be helpful! Hmm, it might be difficult to reproduce this bug in a testing application, but I will try if I find the time. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlKmI9+lAHD7HULYRAmrQAJ0SXYTUtZ3Zb2cK+vU8sKwKCQJ5dwCdEHhj O5sGOd3P+7LBAi+o69GNizs= =wizN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 IoC: How to invoke a decorator method after the service method invoked
All right... This is so cool. Just the way I wanted it. Thank you so much Davor. ;) You the man. I think this should be documented since I believe many people wanted to create their own decorator. On 7/11/07, Davor Hrg [EMAIL PROTECTED] wrote: ... interceptor is an implementation of the service interface, you then code manualy method implementations, choosing when and how to call the delegate service. -- It's not just about coding, it's a matter of fulfilling you core being YM!: thejavafreak Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 howto tapestry-hibernate
hi, yes i got this configuration in my web.xml and everything except hibernate works for me so far. i also added the code public static CatalogDao buildCtalaogDao( @InjectService(Session) Session session) { return new CatalogDaoImpl(session); } to my AppModule.java with no results. the debug output remains exactly the same. the only thing that makes a difference is when i place a package-info.javafile in the entities folder. but i dont know what this is and what its good for. at least it changes its output to: [DEBUG] HibernateSessionSource Constructed configuration: [ org.czarlylab.javashop.entities] even if package-info.java file is totally empty. but it doesnt find the entities. its the same with T5.0.5 and T5.0.4 2007/7/11, Davor Hrg [EMAIL PROTECTED]: tapestry hibernate will pick it up if you follow the structure . myapp.entities myapp.pages myapp.components .. take a look at the error [WARN] AnnotationBinder Package not found or wo package-info.java : org.czarlylab.javashop.entities are you sure you have correct value in web.xml: param-nametapestry.app-package/param-name param-valueorg.czarlylab.javashop/param-value Davor Hrg On 7/11/07, Sebastian Heyden [EMAIL PROTECTED] wrote: additionaly i want to give you my hibernate.cfg.xml and the following exception hibernate-configuration session-factory property name=configurationClass org.hibernate.cfg.AnnotationConfiguration/property property name=connection.driver_class org.apache.derby.jdbc.EmbeddedDriver/property property name=hibernate.connection.urljdbc:derby:JAVASHOP;create=true /property property name=hibernate.connection.usernameAPP/property property name=hibernate.connection.password/property property name=hibernate.connection.pool_size10/property property name=show_sqltrue/property property name=dialectorg.hibernate.dialect.DerbyDialect /property property name=hibernate.hbm2ddl.autocreate/property !-- Cache Configurations -- !-- Using net.sf.ehcache.hibernate.SingletonEhCacheProvider instead of net.sf.ehcache.hibernate.EhCacheProvider ensures the same instance of CacheManager is referred to by both Hibernate and our JMX Agent simpleJpaHibernateApp.agents.jmxAgent. (Thanks to Greg Luck!) -- property name=hibernate.cache.use_minimal_putsfalse/property property name=hibernate.cache.use_query_cachetrue/property property name= hibernate.cache.use_second_level_cachetrue/property property name=hibernate.cache.use_structured_entriestrue/property property name=hibernate.cache.provider_class org.hibernate.cache.EhCacheProvider/property property name=hibernate.generate_statisticsfalse/property property name=hibernate.cache.use_structured_entriesfalse/property /session-factory /hibernate-configuration --- [INFO] HibernateSessionSource Hibernate startup: 646 ms to configure, 4.904ms overall. [INFO] HibernateSessionSource Configured Hibernate entities: [ERROR] BrowseCatalog Render queue error in SetupRender[BrowseCatalog: categorylist.loop]: Failure reading parameter source of component BrowseCatalog:categorylist.loop: Unknown entity: org.czarlylab.javashop.entities.Category 2007/7/11, Sebastian Heyden [EMAIL PROTECTED] : that helped me a lot further! but now i have the problem that the entities are not found. aren't they automaticly picked up by tapestry-hibernate? this is my debug output: [INFO] Started Jetty Server [DEBUG] HibernateSessionManager Creating service 'HibernateSessionManager'. [DEBUG] Session Invoking method org.apache.tapestry.hibernate.HibernateModule.build (HibernateSessionManager, PropertyShadowBuilder) (at HibernateModule.java:84). [DEBUG] HibernateSessionSource Creating service 'HibernateSessionSource'. [DEBUG] HibernateSessionManager Invoking method org.apache.tapestry.hibernate.HibernateModule.build (HibernateSessionSource, ThreadCleanupHub) (at HibernateModule.java:62). [DEBUG] HibernateSessionSource Invoking method org.apache.tapestry.hibernate.HibernateModule.contributeHibernateSessionSource (Configuration, String) (at HibernateModule.java:51). [DEBUG] HibernateSessionSource Constructed configuration: [ org.czarlylab.javashop.entities] [DEBUG] HibernateSessionSource Invoking constructor org.apache.tapestry.internal.hibernate.HibernateSessionSourceImpl(Log, Collection, ClassNameLocator) (at HibernateSessionSourceImpl.java:35). [WARN] AnnotationBinder Package not found or wo package-info.java: org.czarlylab.javashop.entities [WARN] ConfigurationFactory No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Users/basti/.m2/repository/net/sf/ehcache/ehcache/1.2.3/ehcache- 1.2.3.jar!/ehcache-failsafe.xml [WARN] JDBCExceptionReporter SQL Warning: 1, SQLState: 01J01 [WARN]
RE: Tap 4.1.2 Bug found ???
Once you find out what's wrong with EventConnectionVisitor, you can patch Tapestry quite easily, without even building Tapestry yourself, thanks to HiveMind. The EventConnectionVisitor is a HiveMind service, which you can override from your application by putting into your hivemodule.xml something like: implementation service-id=tapestry.page.EventConnectionVisitor invoke-factory model=pooled construct class=your.impl.of.EventConnectionVisitor set-service property=eventInvoker service-id=tapestry.event.EventInvoker/ /construct /invoke-factory /implementation -Original Message- From: Bastian Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 11:57 AM To: Tapestry users Subject: Re: Tap 4.1.2 Bug found ??? -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 As I see in JIRA, this bug should be fixed in 4.1.3 As it is quite a critical bug to us, what can we do to fix it? Would it make sense to patch against 4.1.2? How can I make such a patch? Regards Bastian Voigt Bastian Voigt wrote: [EMAIL PROTECTED] wrote: Bastian, please have a look at https://issues.apache.org/jira/browse/TAPESTRY-1556 . Maybe you can temporarily work around this by toying with your form-id and their specification on the EventListener annotation. I have temporarily worked around this bug by duplicating my component class. Maybe you can add your problem with source-code, if possible, to that issue. That would definitively be helpful! Hmm, it might be difficult to reproduce this bug in a testing application, but I will try if I find the time. - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlKmI9+lAHD7HULYRAmrQAJ0SXYTUtZ3Zb2cK+vU8sKwKCQJ5dwCdEHhj O5sGOd3P+7LBAi+o69GNizs= =wizN -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tap 4.1.2 Bug found ???
Hmm, it might be difficult to reproduce this bug in a testing application, but I will try if I find the time. if you do need assistance with this, it would also be helpful to know the exact page/component structure of your setup. A working source-example is not strictly necessary (though it helps, of course). Especially: - are components from different pages rendered while rendering any of the relevant pages (via the @Block/@RenderBlock mechanism)? - is the form to be submitted asynchronously contained in the vesselSelect component or does it contain the component? some snippets that make this clear could really be helpful! - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlKVG9+lAHD7HULYRArDLAJoDU0itEWHLwEbZicVH0in0tT6j1ACcCP9G 1yZLAKNDF+ynVQSt5o+dsd8= =4cgs -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tutorial not working with jetty plugin.
Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvn jetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4.1.2 How to display client server validation errors same way?
Hi all, Is there a way to make client-side validation errors display in exactly the same way as server-side validation errors ie. leave it to the delegate instead of displaying it with dojo widgets? Regards, Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tutorial not working with jetty plugin.
Hi, I don't remember if it was this error that we also encountered, but if you are running eclipse/jetty launcher with jdk6, then you need to replace the jettyplugin.jar by a patched version. Cheers, Martin On Wed, 2007-07-11 at 19:18 +0800, John Lee wrote: Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvn jetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke http://www.javakaffee.de/blog/ signature.asc Description: This is a digitally signed message part
Tap4.1.2: problems with ajax-response
Hallo! I'm still fighting my way through the ajax functionality. It's at least partially working now but i got a very strange behavior which i'm circling around for quite some time. The page-template looks something like this: [...] form jwcid=[EMAIL PROTECTED] delegate=bean:delegate updateComponents=ognl:updatableReportFormIds table trtd table tr jwcid=@Any id=add_0 [...] /tr tr jwcid=@Any id=add_1 [...] /tr /table /td/tr trtd table tr jwcid=@Any id=remove_0 [...] /tr tr jwcid=@Any id=remove_1 [...] /tr /table /td/tr /table /form [...] In the above case getUpdatableFormIds() should return {add_0, add_2, remove_0, remove_1}. Should as it only gets me an error message from dojo stating WARNING: 13:58:38: No ajax-response elements received. and therefor nothing is rendered. The response looks fine in firebug afaik. If i restrict the updatableComponsnts to add_0 and add_1 everything works fine. Does this behavior ring a bell to anybody here? Rgards, Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: How to retrieve message from default Errors.properties
You can find it here! http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner 2007/7/11, Adam Zimowski [EMAIL PROTECTED]: Okay, I still don't know a Tap5 way of doing this, so this works, although that's an ugly hack: Template: t:errors banner=banner/ Page Class: public String getBanner() { if(_unknownError) { return Unknown Error; } else { return getDefaultBanner(); } } private String getDefaultBanner() { try { Properties props = new Properties(); InputStream in = getClass().getResourceAsStream(/org/apache/tapestry/corelib/components/Errors.properties); props.load(in); String banner = props.getProperty(default-banner); in.close(); return banner; } catch(Exception e) { return e.getMessage(); } } However, wouldn't this be much simpler? (It doesn't work though). @Inject @Path(classpath:org/apache/tapestry/corelib/components/Errors.properties) private Messages _errorMessages; public String getBanner() { if(_unknownError) { return Unknown Error; } else { return _errorMessages.get(default-banner); } } I know that documentation for @Path annotation states it can only be used in conjunction with Assets. But wouldn't this be a good case as well? What am I missing? On 7/9/07, Adam Zimowski [EMAIL PROTECTED] wrote: Hi, In my page class I'd like to retrieve the original value for default-banner (You must correct the following errors before you may continue.) which is stored in Errors.properties in tapestry-core.jar. I'd like to have this String accessible to my page class as a property. Is there a field annotation for this or should I just use standard property file read mechanism to get at that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 徐 依伟
Re: T5: How to retrieve message from default Errors.properties
Thanks, but I've seen that. It's not what I've been trying to do. Rather than overriding the message I simply want my application to read Errors.properties just like tapestry does it. On 7/11/07, Donyee [EMAIL PROTECTED] wrote: You can find it here! http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner 2007/7/11, Adam Zimowski [EMAIL PROTECTED]: Okay, I still don't know a Tap5 way of doing this, so this works, although that's an ugly hack: Template: t:errors banner=banner/ Page Class: public String getBanner() { if(_unknownError) { return Unknown Error; } else { return getDefaultBanner(); } } private String getDefaultBanner() { try { Properties props = new Properties(); InputStream in = getClass().getResourceAsStream(/org/apache/tapestry/corelib/components/Errors.properties); props.load(in); String banner = props.getProperty(default-banner); in.close(); return banner; } catch(Exception e) { return e.getMessage(); } } However, wouldn't this be much simpler? (It doesn't work though). @Inject @Path(classpath:org/apache/tapestry/corelib/components/Errors.properties) private Messages _errorMessages; public String getBanner() { if(_unknownError) { return Unknown Error; } else { return _errorMessages.get(default-banner); } } I know that documentation for @Path annotation states it can only be used in conjunction with Assets. But wouldn't this be a good case as well? What am I missing? On 7/9/07, Adam Zimowski [EMAIL PROTECTED] wrote: Hi, In my page class I'd like to retrieve the original value for default-banner (You must correct the following errors before you may continue.) which is stored in Errors.properties in tapestry-core.jar. I'd like to have this String accessible to my page class as a property. Is there a field annotation for this or should I just use standard property file read mechanism to get at that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 徐 依伟
[T5] Mixing usage
Hi, I try to create my own Mixin. If I use this approach it's ok : @Component @MixinClasses(MyMixin.class) private ActionLink link1; but if I use this approach it's fail : @Mixins(MyMixin) private ActionLink link1; With this exception !!! Caused by: java.lang.IllegalArgumentException: Unable to resolve mixin type 'MyMixin' to a component class name. Available mixin types: core/DiscardBody, core/RenderDisabled, core/RenderInformals, me/MyMixin. The stack trace tell me that MyMixin is registered !!! Thanks for help ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] new Tapestry5Howto entry - Service decorator
Joshua jackson asked for an example on writing a simple Decorator, I've created a simple examle and tried it, then I've put it on Tapestry5Howtos http://wiki.apache.org/tapestry/Tapestry5HowToDecorateService it is a simpler example than the one in the docs (Although the docs describe only the usage of LogingInterceptor you must look at the source to see how it works) example provided here is a simple interceptor without proxies or Javassist Davor Hrg
Re: tutorial not working with jetty plugin.
Are you saying that you can get it to work with JDK 6, thought this wasn't possible?? Is there any way I can find out more about this... this is really important for my organization. thanks in advance! Peter Thanks in advance peter Martin Grotzke wrote: Hi, I don't remember if it was this error that we also encountered, but if you are running eclipse/jetty launcher with jdk6, then you need to replace the jettyplugin.jar by a patched version. Cheers, Martin On Wed, 2007-07-11 at 19:18 +0800, John Lee wrote: Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvn jetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Stavrinides Albourne Partners (Cyprus) Ltd Tel: +357 22 750652 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] PageTester no render script
Hi, Why PageTester don't render script added to my pages ? Maybe I'm on the wrong way and test the javascript inclusion must not be make with the PageTester but the Tapestry-test utility ? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Mixing usage
try: @Mixins({me/MyMixin}) private ActionLink link1; g, kris David Avenante [EMAIL PROTECTED] 11.07.2007 15:44 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema [T5] Mixing usage Hi, I try to create my own Mixin. If I use this approach it's ok : @Component @MixinClasses(MyMixin.class) private ActionLink link1; but if I use this approach it's fail : @Mixins(MyMixin) private ActionLink link1; With this exception !!! Caused by: java.lang.IllegalArgumentException: Unable to resolve mixin type 'MyMixin' to a component class name. Available mixin types: core/DiscardBody, core/RenderDisabled, core/RenderInformals, me/MyMixin. The stack trace tell me that MyMixin is registered !!! Thanks for help ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Measuring time spent on site using tapestry
Hello, Is there a way to measure time spent surfing our website using tapestry 3.1. And if not in 3.1 is there a way in later versions? The reason for this is statistical sites are now using time spent on sites as a measure as much as using page views/sessions which we already track using tapestry. Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Mixing usage
Yep it's work fine. Ok so I presume there is a configuration somewhere to use core by default ;) Thanks for your help On 7/11/07, Kristian Marinkovic [EMAIL PROTECTED] wrote: try: @Mixins({me/MyMixin}) private ActionLink link1; g, kris David Avenante [EMAIL PROTECTED] 11.07.2007 15:44 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema [T5] Mixing usage Hi, I try to create my own Mixin. If I use this approach it's ok : @Component @MixinClasses(MyMixin.class) private ActionLink link1; but if I use this approach it's fail : @Mixins(MyMixin) private ActionLink link1; With this exception !!! Caused by: java.lang.IllegalArgumentException: Unable to resolve mixin type 'MyMixin' to a component class name. Available mixin types: core/DiscardBody, core/RenderDisabled, core/RenderInformals, me/MyMixin. The stack trace tell me that MyMixin is registered !!! Thanks for help ;) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: bug in redirect?
public class Start { String onActivate() { return ANYCLASS.class.getSimpleName(); } } This works only if URL requested explicitly states the start page: http://localhost/MYAPP/start However, if URL requested omits start (default page) http://localhost/MYAPP/ The request never returns. Tomcat 5.5, Tap 5.0.5. -adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: How to retrieve message from default Errors.properties
@Inject private Messages _errorMessages; Try this! 2007/7/11, Adam Zimowski [EMAIL PROTECTED]: Thanks, but I've seen that. It's not what I've been trying to do. Rather than overriding the message I simply want my application to read Errors.properties just like tapestry does it. On 7/11/07, Donyee [EMAIL PROTECTED] wrote: You can find it here! http://wiki.apache.org/tapestry/Tapestry5HowToOverrideTheDefaultErrorMessageBanner 2007/7/11, Adam Zimowski [EMAIL PROTECTED]: Okay, I still don't know a Tap5 way of doing this, so this works, although that's an ugly hack: Template: t:errors banner=banner/ Page Class: public String getBanner() { if(_unknownError) { return Unknown Error; } else { return getDefaultBanner(); } } private String getDefaultBanner() { try { Properties props = new Properties(); InputStream in = getClass().getResourceAsStream(/org/apache/tapestry/corelib/components/Errors.properties); props.load(in); String banner = props.getProperty(default-banner); in.close(); return banner; } catch(Exception e) { return e.getMessage(); } } However, wouldn't this be much simpler? (It doesn't work though). @Inject @Path(classpath:org/apache/tapestry/corelib/components/Errors.properties) private Messages _errorMessages; public String getBanner() { if(_unknownError) { return Unknown Error; } else { return _errorMessages.get(default-banner); } } I know that documentation for @Path annotation states it can only be used in conjunction with Assets. But wouldn't this be a good case as well? What am I missing? On 7/9/07, Adam Zimowski [EMAIL PROTECTED] wrote: Hi, In my page class I'd like to retrieve the original value for default-banner (You must correct the following errors before you may continue.) which is stored in Errors.properties in tapestry-core.jar. I'd like to have this String accessible to my page class as a property. Is there a field annotation for this or should I just use standard property file read mechanism to get at that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 徐 依伟 -- 徐 依伟
[T5]Global object?
Hi, I search into the mailing list and didn't find how to declare an object such as an ArrayList at the context level. ASO is for session and @Persist for requests, but what about the Application/Context level? My site needs to maintains a list of users with their status without having to reload it from the database at each new session created. Thanks M.
Re: [T5]Global object?
Try using a public class with static fields and methods. This is best for things that can be recreated programmatically, like a hardcoded list of months. Just remember that changes you make will disappear when you restart your app container, unless you migrate the data to a more persistant storage, like a DB or file. On 7/11/07, Michael Bernagou [EMAIL PROTECTED] wrote: Hi, I search into the mailing list and didn't find how to declare an object such as an ArrayList at the context level. ASO is for session and @Persist for requests, but what about the Application/Context level? My site needs to maintains a list of users with their status without having to reload it from the database at each new session created. Thanks M. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap4.1.2: problems with ajax-response
Hello again! Problem was a br instead of br/ which prevented dojo from completing it's task :| Regards, Patrick Hallo! I'm still fighting my way through the ajax functionality. It's at least partially working now but i got a very strange behavior which i'm circling around for quite some time. The page-template looks something like this: [...] form jwcid=[EMAIL PROTECTED] delegate=bean:delegate updateComponents=ognl:updatableReportFormIds table trtd table tr jwcid=@Any id=add_0 [...] /tr tr jwcid=@Any id=add_1 [...] /tr /table /td/tr trtd table tr jwcid=@Any id=remove_0 [...] /tr tr jwcid=@Any id=remove_1 [...] /tr /table /td/tr /table /form [...] In the above case getUpdatableFormIds() should return {add_0, add_2, remove_0, remove_1}. Should as it only gets me an error message from dojo stating WARNING: 13:58:38: No ajax-response elements received. and therefor nothing is rendered. The response looks fine in firebug afaik. If i restrict the updatableComponsnts to add_0 and add_1 everything works fine. Does this behavior ring a bell to anybody here? Rgards, Patrick - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Measuring time spent on site using tapestry
You could do it using a timestamp in an ASO that follows a user. Similar to having a last-logged-in timestamp. ASO's that get logged out manually (user initiated) can use logout_time - last_start_time ASO's that get logged out automatically (via timeout) can use logout_time - timeout_length -last_start_time A simpler version could just use this: Last Page Impression - ASO creation time The page impression calculation could be done in a border (aka layout) component, so you don't have to modify all your pages. I am planning something similar -- I only need to track page impression counts. I don't think there is a way (besides wierd javascript) to count the time that the page is displayed on the screen. The browser could be in the background, not being surfed Daniel On 7/11/07, James Sherwood [EMAIL PROTECTED] wrote: Hello, Is there a way to measure time spent surfing our website using tapestry 3.1. And if not in 3.1 is there a way in later versions? The reason for this is statistical sites are now using time spent on sites as a measure as much as using page views/sessions which we already track using tapestry. Thanks, James - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 4.1.2 Bug found ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: if you do need assistance with this, it would also be helpful to know the exact page/component structure of your setup. A working source-example is not strictly necessary (though it helps, of course). Especially: - are components from different pages rendered while rendering any of the relevant pages (via the @Block/@RenderBlock mechanism)? Yes! The VesselSuggest component contains three @RenderBlock in a @For loop. The blocks are defined by the component user (i.e. the page) and they render a custom link and/or text which is displayed inside the component for each search result that matches the search string. The @For loop is updated via the EventListener mechanism, since the set of result entities changes with each character typed in by the user. Component HTML: - --- form jwcid=@Form span jwcid=@For -- iterate over ajax search results span jwcid=@RenderBlock block=ognl:block1 / span jwcid=@RenderBlock block=ognl:block2 / span jwcid=@RenderBlock block=ognl:block3 / /span /form Page HTML: - -- span jwcid=@VesselSuggest/span span jwcid=[EMAIL PROTECTED] ... /span span jwcid=[EMAIL PROTECTED] ... /span span jwcid=[EMAIL PROTECTED] ... /span Component Java Code: - private Block getBlockByName(String name) { for (Object e:getContainer().getComponents().values()) if (e instanceof Block ((Block)e).getId().equalsIgnoreCase(name)) return (Block)e; return null; } public Block getBlock1() { return getBlockByName(block1); } public Block getBlock2() { return getBlockByName(block2); } public Block getBlock3() { return getBlockByName(block3); } - is the form to be submitted asynchronously contained in the vesselSelect component or does it contain the component? The form is contained in the component. Hope this helps!! Regards Bastian - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlPYN9+lAHD7HULYRAjP/AJ9r5Aex/PNS5oIVyQYVL/E4cArBzgCeMTMF PSv+fsz3YFkEym+OvUXcksM= =bz95 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 4.1.2 Bug found ???
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sorry, I have to correct my last post: The for loop is _NOT_ nested in the form! Component HTML: - --- form jwcid=@Form - input field /form span jwcid=@For -- iterate over ajax search results span jwcid=@RenderBlock block=ognl:block1 / span jwcid=@RenderBlock block=ognl:block2 / span jwcid=@RenderBlock block=ognl:block3 / /span - -- Bastian Voigt Neumünstersche Straße 4 20251 Hamburg telefon +49 - 40 - 67957171 mobil +49 - 179 - 4826359 - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGlPaT9+lAHD7HULYRArHSAJ97gPartnzwSTF2LTq/5oXNl5VrEgCggtEr 8UWGtY3KiRtmBnSTQH7+cyA= =cE6B -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tutorial not working with jetty plugin.
You might search in the list archives for jettylauncher.jar (to find e.g. the thread http://www.nabble.com/Tapestry-5-and-Template-Reloading-t3671362.html) or have a look at this posting: http://papercut.biz/blog/matt/2005/02/17/gotta-love-open-source-i-fixed-it-myself/ Additionally you should have followed the installation description of Howards tutorial (to run jettylauncher with jetty 5). Cheers, Martin On Wed, 2007-07-11 at 16:46 +0300, Peter Stavrinides wrote: Are you saying that you can get it to work with JDK 6, thought this wasn't possible?? Is there any way I can find out more about this... this is really important for my organization. thanks in advance! Peter Thanks in advance peter Martin Grotzke wrote: Hi, I don't remember if it was this error that we also encountered, but if you are running eclipse/jetty launcher with jdk6, then you need to replace the jettyplugin.jar by a patched version. Cheers, Martin On Wed, 2007-07-11 at 19:18 +0800, John Lee wrote: Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvn jetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Martin Grotzke http://www.javakaffee.de/blog/ signature.asc Description: This is a digitally signed message part
Re: T5: Grid component / Date columns are not displayed
Hey Howard, is there a timetable on the date-feature? Is there a workaround? Thanks in advance Jens Howard Lewis Ship wrote: On 7/9/07, CarstenM [EMAIL PROTECTED] wrote: Hey guys, I am new to tapestry and I know T5 is still alpha. But anyway, I have a class with a few Date attributes. That's coming. This class should be displayed with a grid component but all the Date attributes are missing. Is there already a solution for Date columns in a Grid component? Additionally, how can I change the column width? Every TH and TD is rendered with an appropriate CSS class value, based on the name of the property ... do a view source for the details. You can then add explicit width controls via standard CSS. Cheers Carsten -- View this message in context: http://www.nabble.com/T5%3A-Grid-component---Date-columns-are-not-displayed-tf4050255.html#a11504520 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Grid-component---Date-columns-are-not-displayed-tf4050255.html#a11542700 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Grid component / Date columns are not displayed
no and yes :-) The underlying BeanModelSource is driven by extensible contributions, so it is quite possible to contribute in a mapping from java.util.Date to date and provide a block for displaying dates. When will this get fixed? In a perfect universe, I would be able to perfect (and document) each feature before adding the next. However, I think people are very eager to see the Ajax support, so that's pretty much next on my list. On 7/11/07, elmeromero [EMAIL PROTECTED] wrote: Hey Howard, is there a timetable on the date-feature? Is there a workaround? Thanks in advance Jens Howard Lewis Ship wrote: On 7/9/07, CarstenM [EMAIL PROTECTED] wrote: Hey guys, I am new to tapestry and I know T5 is still alpha. But anyway, I have a class with a few Date attributes. That's coming. This class should be displayed with a grid component but all the Date attributes are missing. Is there already a solution for Date columns in a Grid component? Additionally, how can I change the column width? Every TH and TD is rendered with an appropriate CSS class value, based on the name of the property ... do a view source for the details. You can then add explicit width controls via standard CSS. Cheers Carsten -- View this message in context: http://www.nabble.com/T5%3A-Grid-component---Date-columns-are-not-displayed-tf4050255.html#a11504520 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Grid-component---Date-columns-are-not-displayed-tf4050255.html#a11542700 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]Global object?
You can use the @ApplicationState annotation on a field to mark it as an application-wide state object. It will be stored in the HttpSession. Most of the infrastructure for storing such an object in the ServletContext is available; see the ApplicationStatePersistenceStrategySource service. What's missing is to define a context application state persistence strategy, contribute it to the service, and contribute a ApplicationStateContribution to the ApplicationStateManager service to defne that your ASO belongs in the context, not the (default) session. Again, these are things that will eventually be cooked right into Tapestry (hint: add a JIRA issue) but in the meantime, can be added on an ad-hoc basis. Now that's what I call Dependency Injection! Side note: and that's why we need T5 IoC and not Guice or Spring. Those don't have a concept similar to Tapestry's service configuration / contribution system. On 7/11/07, Michael Bernagou [EMAIL PROTECTED] wrote: Hi, I search into the mailing list and didn't find how to declare an object such as an ArrayList at the context level. ASO is for session and @Persist for requests, but what about the Application/Context level? My site needs to maintains a list of users with their status without having to reload it from the database at each new session created. Thanks M. -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.2 How to display client server validation errors same way?
Hi You can offcourse fake the client side validation with AJAXed request. For example on form submit you refresh DIV with @ShowErrors component inside, in case no errors are found you redirect or do any other action you need. It will not be exactly the client-side validation but atleast it will look the same. Renat On 11/07/07, Geoff Callender [EMAIL PROTECTED] wrote: Hi all, Is there a way to make client-side validation errors display in exactly the same way as server-side validation errors ie. leave it to the delegate instead of displaying it with dojo widgets? Regards, Geoff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Renat Zubairov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.2 error loading hivemind-service
Hi This exception javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; Means that you have a Javassist version mismatch, check your classpath for the older versions of Javassist. Renat On 11/07/07, Peter Schröder [EMAIL PROTECTED] wrote: hi, i am doing a simple test with the new version of tapestry (runs fine with 4.0.2): public class LoginTest extends TestCase { public void testService() { Registry registry = RegistryBuilder.constructDefaultRegistry(); AGLoginService service = (AGLoginService) registry.getService(AGLoginService.class); boolean isAdmin = false; ArrayListString ldapRoles = new ArrayListString(); ldapRoles.add(admin); String userName = dummyuser; String userPassword = xyz; service.authUser(userName, userPassword, ldapRoles, isAdmin); } } resulting in the following stacktrace using javassist-3.4.ga. i also tried to use an old version of javassist (3.0) wich doesnt work either... 09:00:59,239 DEBUG [ConfigurationPointImpl] Constructing extension point hivemind.ServiceModels org.apache.hivemind.ApplicationRuntimeException: Unable to create class $Runnable_113b414a9d1: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:130) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getService(SingletonServiceModel.java:57) at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:210) at org.apache.hivemind.impl.ServicePointImpl.getService(ServicePointImpl.java:223) at org.apache.hivemind.impl.RegistryInfrastructureImpl.getService(RegistryInfrastructureImpl.java:207) at org.apache.hivemind.impl.RegistryInfrastructureImpl.startup(RegistryInfrastructureImpl.java:434) at org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:154) at org.apache.hivemind.impl.RegistryBuilder.constructDefaultRegistry(RegistryBuilder.java:196) at de.freenet.pos.posDB.test.LoginTest.testService(LoginTest.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to create class $Runnable_113b414a9d1: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:89) at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:78) at org.apache.tapestry.enhance.AbstractFab.createClass(AbstractFab.java:91) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxyClass(SingletonServiceModel.java:185) at org.apache.hivemind.impl.servicemodel.SingletonServiceModel.createSingletonProxy(SingletonServiceModel.java:102) ... 24 more Caused by: java.lang.NoSuchMethodError: javassist.CtClass.toClass(Ljava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class; at org.apache.tapestry.enhance.HiveMindClassPool.toClass(HiveMindClassPool.java:79) at org.apache.tapestry.enhance.CtClassSource.createClass(CtClassSource.java:85) ... 28 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Renat Zubairov
Re: Russian symbols problems
The basic JVM and Java feature (independent of Tapestry or any other framework) as we all know that every character is represented as two bytes, it means as soon as byte-to-character conversion happened characters can't be truncated anymore inside JVM. The major points where data loss can happen is IO - where data is transformed in a set of bytes. Such pain points are filesystem, network, etc. This means that whe resource bundle is loaded it needs to convert bytes in the file to the characters. By default JVM is using platform encoding when loading files, but you can override this settings by specifying -Dfile.encoding=utf8 when running your JVM. Solution proposed in Wiki change the output stream encoding that renders java characters to the network. Hope this will help. Renat On 09/07/07, Steven Coco [EMAIL PROTECTED] wrote: This is somewhat intersting to me. This is the expected, usual, Java behavior (the .properties files must be in ISO 8895-1 encoding); but I thought I read somewhere that T5 allowed one to store the .properties files in UTF-8 encoding. Does this imply that is not so, or perhaps this just has not yet been implemented? Can anyone say more about this feature? Would it apply only to instances of Messages: and not if I manually load a ResourceBundle? That seems likely. It's a pretty odd feature though, somewhat off the beaten Java path (and I am kind of skeptical of it since it seems to bring some amount of required administration with it). Also, if it would indeed rely on the server's platform encoding, then that might make the T5 WebApp out of spec, since it wouldn't be portable... Igor: good luck with this. While the topic is here, has anyone explored how T5 would handle an attempt to specify a custom ResourceBundle.Control object? Or is there a plan already in place? This is not currently critical at all for me, thought I was an immediate fan of the XML properties files, and use them myself in desktop development. Ciao! -Steev Coco. On Sat July 7 2007 10:11:18 am Igor Drobiazko [EMAIL PROTECTED] wrote: Hi, you have 2 possibilities: either convert your property files into native-encoded characters or start you server in UTF-8 mode. http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/native2ascii.html On 7/7/07, Foror [EMAIL PROTECTED] wrote: I'm using message properties files in UTF-8 with russian symbols, for T4 it's work, but T5 it's not work - russian symbols is damaged Also problem with @ApplicationState, after save state and back to form, russian as well is damaged - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Best regards, Renat Zubairov - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] PageTester no render script
Forget this stupid question, all work fine now after the add of a Border ;) On 7/11/07, David Avenante [EMAIL PROTECTED] wrote: Hi, Why PageTester don't render script added to my pages ? Maybe I'm on the wrong way and test the javascript inclusion must not be make with the PageTester but the Tapestry-test utility ? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 tutorial not working with jetty plugin.
Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvjetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tutorial not working with jetty plugin.
No, I am running JDK5. Thanks John - Original Message - From: Peter Stavrinides [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Wednesday, July 11, 2007 9:46 PM Subject: Re: tutorial not working with jetty plugin. Are you saying that you can get it to work with JDK 6, thought this wasn't possible?? Is there any way I can find out more about this... this is really important for my organization. thanks in advance! Peter Thanks in advance peter Martin Grotzke wrote: Hi, I don't remember if it was this error that we also encountered, but if you are running eclipse/jetty launcher with jdk6, then you need to replace the jettyplugin.jar by a patched version. Cheers, Martin On Wed, 2007-07-11 at 19:18 +0800, John Lee wrote: Dear list, I followed the tutorial to work on the BeanEditForm, the web work perfectly with mvn jetty:run, but it doesn't work inside eclipse. I followed the tutorial to create the jetty web. I got No root element has been defined error when I click on the Create new address page link. Does anyone know what went wrong? Thanks John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Peter Stavrinides Albourne Partners (Cyprus) Ltd Tel: +357 22 750652 If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Please visit http://www.albourne.com/email.html for important additional terms relating to this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
t5 :: onSucess() doesn't work for forms
im in the middle of this tutorial, andi think i found a bug. im working with 5.0.5 http://elozovan.blogspot.com/2007/05/simpletapestry-5-crud-application-step_24.html and was checking the adduser page that that step has you create to test the hibernate functionatlity. the onSucess() event handler for the form does not work. When i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. would it be possible if some more documentation or possible an overvierw of all of the event handlers that each of teh components are used thanx ~evan
T 5.0.5 How To obtain a selected value from a radio button
-- View this message in context: http://www.nabble.com/T-5.0.5-How-To-obtain-a-selected-value-from-a-radio-button-tf4064072.html#a11547056 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 component parameter binding not updated
Hi, I wrote a simple pager component but one parameter (currentPage) is not updated in a second request. In the template I have the following: t:pager t:numberOfPages=${numberOfPages} t:currentPage=${currentPage} ... some other attributes ... / In the page class this currentPage accessor: public int getCurrentPage() { return _currentPage; } which is an int and has the correct values in all requests. The pager component contains this currentPage property @Parameter(required = true, defaultPrefix=prop) private Integer _currentPage; which is used in @BeginRender boolean beginRender( MarkupWriter writer ) which returns false (no other render methods, no template). When I debug the code I see, that the first time, the _currentPage is accessed, the pages getCurrentPage method is invoked. In all subsequent page requests, the value of the first request is still stored and not updated. What am I doing wrong, or should T5 behave differently? Do I have to take any action to unbind/uncache/reset the currentPage property in the pager component? Thanx cheers, Martin signature.asc Description: This is a digitally signed message part
Re: t5 :: onSucess() doesn't work for forms
Hello, Evan. Could you please add more details? the onSucess() event handler for the form does not work - are you getting some exception or it just nothing happens upon the form submitting? i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. - i.e. no exceptions and a new record in a DB, right? Also, have you tried this on 5.0.4 or you started right with 5.0.5? Anyway, let me have some time for migration to 5.0.5 and to get the issue. Thank you, E.L. On 11/07/07, Evan Rawson - Work [EMAIL PROTECTED] wrote: im in the middle of this tutorial, andi think i found a bug. im working with 5.0.5 http://elozovan.blogspot.com/2007/05/simpletapestry-5-crud-application-step_24.html and was checking the adduser page that that step has you create to test the hibernate functionatlity. the onSucess() event handler for the form does not work. When i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. would it be possible if some more documentation or possible an overvierw of all of the event handlers that each of teh components are used thanx ~evan
Passing a parameter in OGNL?
Does anyone know how to pass a parameter to a method in OGNL? thanks, Mark Mark J. Stang Software Engineer office: +1 303.468.2900 Ping Identity
RE: Passing a parameter in OGNL?
Just pass it in with parentheses like in Java: ognl:myMethod(myArg) If the method is a getter/setter make sure to use the full method name instead of the usual shortened version: ognl:setProperty(property) Ben -Original Message- From: Mark Stang [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 11, 2007 4:04 PM To: Tapestry users; users@tapestry.apache.org Subject: Passing a parameter in OGNL? Does anyone know how to pass a parameter to a method in OGNL? thanks, Mark Mark J. Stang Software Engineer office: +1 303.468.2900 Ping Identity - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] Mixing usage
Hi, I try to add a mixin on an ActionLink like this : @Component @Mixins(MyMixin) private ActionLink link1; Is it possible to access in MyMixin the property private List? _context; available in the ActionLink ? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5 :: onSucess() doesn't work for forms
Two possible issues: One, onSucess() is misspelled, if that's a direct copy. It should be onSuccess(). Second, try onSuccessFromRegistrationForm(). Bill On 7/11/07, Eugene Lozovan [EMAIL PROTECTED] wrote: Hello, Evan. Could you please add more details? the onSucess() event handler for the form does not work - are you getting some exception or it just nothing happens upon the form submitting? i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. - i.e. no exceptions and a new record in a DB, right? Also, have you tried this on 5.0.4 or you started right with 5.0.5? Anyway, let me have some time for migration to 5.0.5 and to get the issue. Thank you, E.L. On 11/07/07, Evan Rawson - Work [EMAIL PROTECTED] wrote: im in the middle of this tutorial, andi think i found a bug. im working with 5.0.5 http://elozovan.blogspot.com/2007/05/simpletapestry-5-crud-application-step_24.html and was checking the adduser page that that step has you create to test the hibernate functionatlity. the onSucess() event handler for the form does not work. When i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. would it be possible if some more documentation or possible an overvierw of all of the event handlers that each of teh components are used thanx ~evan
T5: Is the 5.0.5 release considered beta still?
...project-planning minds at my place of employment wish to know...
Re: T5: Is the 5.0.5 release considered beta still?
Hi! ...project-planning minds at my place of employment wish to know... It's alpha even. From the recent announcement on this list: Yet another preview (alpha) release, Tapestry 5.0.5 adds many new components, including ... Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5 IoC vs. Guice
Hi, Just a quick question; having read about Guice (http://code.google.com/p/google-guice/) and rereading the arguments made for T5 IoC (http://tapestry.apache.org/tapestry5/tapestry-ioc/index.html - why not Spring, why not Hivemind) I just have to ask: In hindsight would it have been just as good or better (if the timing of Guice would have been right) to have used Guice instead of creating T5 IoC? Thanks, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 IoC vs. Guice
Thx. for point this blog entry out. You should read Howard's blog, he has some answers to why not Guice in it. http://tapestryjava.blogspot.com/search?q=guice Kalle On 7/11/07, Jan Vissers [EMAIL PROTECTED] wrote: Hi, Just a quick question; having read about Guice (http://code.google.com/p/google-guice/) and rereading the arguments made for T5 IoC (http://tapestry.apache.org/tapestry5/tapestry-ioc/index.html - why not Spring, why not Hivemind) I just have to ask: In hindsight would it have been just as good or better (if the timing of Guice would have been right) to have used Guice instead of creating T5 IoC? Thanks, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5 :: onSucess() doesn't work for forms
im so sorry i spelled it wrong. its the double c thing. to many double letters. i guess thats what i get from relying on t3/t4's extensive valuidation complaints. sorry to waste your time evan - Original Message - From: Bill Holloway [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Wednesday, July 11, 2007 6:01 PM Subject: Re: t5 :: onSucess() doesn't work for forms Two possible issues: One, onSucess() is misspelled, if that's a direct copy. It should be onSuccess(). Second, try onSuccessFromRegistrationForm(). Bill On 7/11/07, Eugene Lozovan [EMAIL PROTECTED] wrote: Hello, Evan. Could you please add more details? the onSucess() event handler for the form does not work - are you getting some exception or it just nothing happens upon the form submitting? i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. - i.e. no exceptions and a new record in a DB, right? Also, have you tried this on 5.0.4 or you started right with 5.0.5? Anyway, let me have some time for migration to 5.0.5 and to get the issue. Thank you, E.L. On 11/07/07, Evan Rawson - Work [EMAIL PROTECTED] wrote: im in the middle of this tutorial, andi think i found a bug. im working with 5.0.5 http://elozovan.blogspot.com/2007/05/simpletapestry-5-crud-application-step_24.html and was checking the adduser page that that step has you create to test the hibernate functionatlity. the onSucess() event handler for the form does not work. When i changed it to onActionFromRegistrationForm() the page seemed to pick it up okay. would it be possible if some more documentation or possible an overvierw of all of the event handlers that each of teh components are used thanx ~evan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: bug in redirect?
Yes, this is a bug in RootPathDispatcher: https://issues.apache.org/jira/browse/TAPESTRY-1627 Until it's fixed, if you really need to you can patch Tapestry at runtime by adding the code below to your AppModule. Cheers, Nick. public void contributeMasterDispatcher( OrderedConfigurationDispatcher configuration, PageRenderRequestHandler pageRenderRequestHandler, ComponentClassResolver componentClassResolver, @Symbol(tapestry.start-page-name) String startPageName, @InjectService(PageResponseRenderer) PageResponseRenderer pageResponseRenderer) { class RootPathDispatcherFix implements Dispatcher { private final ComponentClassResolver _componentClassResolver; private final PageRenderRequestHandler _handler; @SuppressWarnings(unused) private final PageResponseRenderer _renderer; private final String _startPageName; private final String[] _emptyContext = new String[0]; public RootPathDispatcherFix( final ComponentClassResolver componentClassResolver, final PageRenderRequestHandler handler, final PageResponseRenderer renderer, final String startPageName) { _componentClassResolver = componentClassResolver; _handler = handler; _renderer = renderer; _startPageName = startPageName; } public boolean dispatch(Request request, final Response response) throws IOException { // Only match the root path if (!request.getPath().equals(/)) return false; if (_componentClassResolver.isPageName(_startPageName)) { ActionResponseGenerator responseGenerator = _handler.handle(_startPageName, _emptyContext); if (responseGenerator != null) responseGenerator.sendClientResponse(response); return true; } return false; } } // Looks for the root path and renders the start page configuration.add(RootPathFix, new RootPathDispatcherFix(componentClassResolver, pageRenderRequestHandler, pageResponseRenderer, startPageName), before:RootPath); } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter
I haven't had a chance to run a load test of j6u1 vs j6u2 with 5.0.5, however switching to j6u2 on our public test site for the last day seems to have solved the problem. The previous day on j6u1 it stopped responding 4 times. Thanks for pointing out the bug report. -Matt -Original Message- From: Ben Sommerville [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 10, 2007 10:52 PM To: 'Tapestry users' Subject: RE: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter If you are running under jdk 6u1 and tapestry 5.0.5 (or greater) then there is a jvm bug that can cause a deadlock. The bug report is at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6571733. It is supposed to be fixed in jdk 6u2 (which was release recently) but I haven't had a chance to test it yet. cheers Ben -Original Message- From: Martin Grotzke [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 July 2007 9:06 AM To: Tapestry users Subject: Re: T5: NPE in Base64InputStream and locked/waitingCheckForUpdatesFilter The NPE seems to be caused by a missing t:formdata request parameter. I just reproduced this (weird) situation by removing the hidden form field t:formdata with firebug, so that I could produce the NPE. Although, following request went through well, and the number of request processing threads did not increase. So there seems to be no (direct) interrelationship between the NPE and the locked threads. Cheers, Martin On Tue, 2007-07-10 at 23:43 +0200, Martin Grotzke wrote: Hi, we had an issue with our deployed application that did not respond anymore. This happened two or three times in the last 4 days, but I was not able to reproduce it until now. The analysis of the logs showed, that there was a NPE in Base64InputStream, and afterwards the application did not respond anymore. When I triggered a thread dump, all 200 tomcat threads were in status WAITING, like this one: http-9090-1 daemon prio=10 tid=0x2aaaf7e1fc00 nid=0x3f05 waiting on condition [0x4459e000..0x4459fbc0] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for 0x2aaab8228360 (a java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndC heckInterrupt(AbstractQueuedSynchronizer.java:712) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquir eShared(AbstractQueuedSynchronizer.java:842) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireS hared(AbstractQueuedSynchronizer.java:1162) at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.loc k(ReentrantReadWriteLock.java:594) at org.apache.tapestry.ioc.internal.util.ConcurrentBarrier.withRe ad(ConcurrentBarrier.java:70) at org.apache.tapestry.internal.services.CheckForUpdatesFilter.se rvice(CheckForUpdatesFilter.java:110) at $RequestHandler_1139c29ae4a.service($RequestHandler_1139c29ae4a.java) at $RequestHandler_1139c29ae41.service($RequestHandler_1139c29ae41.java) at org.apache.tapestry.services.TapestryModule$11.service(Tapestr yModule.java:1044) at $HttpServletRequestHandler_1139c29ae40.service($HttpServletReq uestHandler_1139c29ae40.java) at org.apache.tapestry.TapestryFilter.doFilter(TapestryFilter.java:135) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEn gineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdap ter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Process or.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle r.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint. java:447) at java.lang.Thread.run(Thread.java:619) I'm not sure if the NPE that happened before is the reason for this, as I don't see the relationship between both issues (apart from the correlation of events/time). Hopefully someone closer to the code can have a look at this and tell what's the