Re: Tapestry-5.4-alpha-2 css overriding
Thanks guys, but I tried both with no success. My custom.css is loaded first in any case Is there any change on this in 5.4-alpha-2? I am used to override default.css definitions with a custom.css in 5.3.x through @Import with no problem. Regards, Matías. Saludos, Matias. On Thu, Feb 7, 2013 at 5:23 PM, Matías Blasi matias.bl...@gmail.com wrote: Hi all, I'm using Tapestry-5.4-alpha-2 in a new project, and I am not beeing able to override some bootstrap.css definitions. I'm @Importing my custom stylesheet in my Layout component, but it included before bootstrap one, and the bootstrap.css overrides mine... How could I override bootstrap.css styles? Regards, Matias.
Tapestry-5.4-alpha-2 css overriding
Hi all, I'm using Tapestry-5.4-alpha-2 in a new project, and I am not beeing able to override some bootstrap.css definitions. I'm @Importing my custom stylesheet in my Layout component, but it included before bootstrap one, and the bootstrap.css overrides mine... How could I override bootstrap.css styles? Regards, Matias.
JAX-WS and session data
Hi all, I'm not sure if it is the correct place, because I'm using some tapestry modules. I have two tapestry applications, app1 is a frontend which consumes Web Services published by app2. I'm using derkoe' jax-ws (https://github.com/derkoe/tapestry-jaxws) to publish WS in app2. I've implemented security in app1 with tynamo-security. My intention is to implement the security in app2 with tynamo-security, too, in order to have the same access control facilities in both places. The login page, does the login in app1, and finally, invokes a WS for doing the login in app2 (passing user and password) The tynamo-security login works fine in both places, but the authentication in app2, does not last more than 1 request, the next WS call fails because of not-authenticated. I think that the point is that the JSESSIONID is not beeing passed from app1 to app2 when calling the WSs. I tried with this before calling the WS: ((BindingProvider)port).getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE); ((BindingProvider)port).getRequestContext().put(JSESSIONID, jsessionId); But it is not received in the WS implementation service. (I'm checking that using @Inject Cookies) Regards, Matias.
Persistant properties, singletons and concurrent users
Hi everybody! I was just wondering how is Tapestry handling concurrent users asking for the same page (which I understand, is a singleton) where each user has a different value for a single persistent property (@Persist) As far as I debbuged, I saw a PropertyConduit in the middle, I suppose it is put over the field access and it is the responsible for getting and setting the actual value for each case/user/thread... but my question is HOW? how (or where) is it implemented? Best Regards, Matias.
Re: Persistant properties, singletons and concurrent users
Sorry guys, I was not sure where to post. My applogies. Matías. Saludos, Matias. On Tue, Jan 22, 2013 at 12:22 PM, Matías Blasi matias.bl...@gmail.comwrote: Hi everybody! I was just wondering how is Tapestry handling concurrent users asking for the same page (which I understand, is a singleton) where each user has a different value for a single persistent property (@Persist) As far as I debbuged, I saw a PropertyConduit in the middle, I suppose it is put over the field access and it is the responsible for getting and setting the actual value for each case/user/thread... but my question is HOW? how (or where) is it implemented? Best Regards, Matias.
5.4-rewrite
Hi all! I'm trying the almost-alpha 5.4. It is because we are starting a project from scratch and I put my bet on 5.4+bootstrap. It is everithing fine up to now, but I need some quickstart, to build a new bootstrap/jquery component with some javascript stuff that I need. I noticed that some things changed in that mechanism (JavaScriptSupport API has deprecated every .add... method, and now there is a module dependency concept which I don't know how to use) In the same way, the new 5.4 bootstrap integration is just in terms of styling? or there are some bootstrap components included? I was seeing tapestry-bootstraphttps://github.com/trsvax/tapestry-bootstrapand I dont know if it is ready for 5.4 or is just a full-stack replacement for 5.3 prototype as got5 did with tapestry5-jqueryhttp://tapestry5-jquery.com/ for jquert. Best regards! Matias.
[Announce] Tapestry-Bootstrap 2.0 early Alpha
Hi all! Is this great tapestry-bootstrap module ready for 5.4? Or is it a full-stack replacement for 5.3 like got5-jquery is for jquery? Regards! Matias.
Re: Tapestry-JPA Testing environment
Hi guys! I found the root of the problem, and it is because the TapestryFilter sets the Context into the ApplicationGlobals, but actually I don't have a webapp, just a JUnit test. I could jump over this by setting a PageTesterContext to the ApplicationGlobals, in a setup phase. Anyway, I am getting another problem and it is while the EntityManagerSourceImpl is trying to create an EntityManager: Caused by: java.lang.RuntimeException: javax.naming.NameNotFoundException; remaining name 'env' at org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl.lookupDataSource(PersistenceUnitInfoImpl.java:362) at org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl.nonJtaDataSource(PersistenceUnitInfoImpl.java:134) at com.bvision.authorization.openjpa.services.OpenJPAAuthorizationModule$1.configure(OpenJPAAuthorizationModule.java:49) at org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.configureRemaining(EntityManagerSourceImpl.java:170) at org.apache.tapestry5.internal.jpa.EntityManagerSourceImpl.init(EntityManagerSourceImpl.java:63) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.apache.tapestry5.ioc.internal.util.ConstructorInvoker.invoke(ConstructorInvoker.java:48) ... 64 more Caused by: javax.naming.NameNotFoundException; remaining name 'env' at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:576) at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:663) at org.eclipse.jetty.jndi.NamingContext.lookup(NamingContext.java:678) at org.eclipse.jetty.jndi.java.javaRootURLContext.lookup(javaRootURLContext.java:110) at javax.naming.InitialContext.lookup(InitialContext.java:409) at org.apache.tapestry5.internal.jpa.PersistenceUnitInfoImpl.lookupDataSource(PersistenceUnitInfoImpl.java:357) It is obvious that I'm missing something, either some dependency or some setup code for making it run in a NON-webapp environment. Could you give me some advise? Best regards, Matias. On Tue, Oct 2, 2012 at 6:30 PM, Matías Blasi matias.bl...@gmail.com wrote: Hi everybody, I am trying to set a POC application with Tapestry-JPA. I just have a couple of entities, services, and tests. This is not a webapp (yet), I'm just starting the registry manually from my test, I did it before, but now something is not working, I dont know if something has changed in the last version of Tapestry, or if I'm loosing something from tapestry-jpa module. I have the persistence.xml in src/test/resources/META-INF/persistence.xml My module configures the following: public class OpenJPAAuthorizationModule { public static void bind(ServiceBinder binder) { binder.bind(AuthorizationService.class, AuthorizationServiceImpl.class); binder.bind(UserService.class, UserServiceImpl.class); binder.bind(UserDAO.class, UserDAOImpl.class); binder.bind(RoleService.class, RoleServiceImpl.class); binder.bind(RoleDAO.class, RoleDAOImpl.class); binder.bind(GroupService.class, GroupServiceImpl.class); binder.bind(GroupDAO.class, GroupDAOImpl.class); binder.bind(EntitlementService.class, EntitlementServiceImpl.class); binder.bind(EntitlementDAO.class, EntitlementDAOImpl.class); } @Contribute(EntityManagerSource.class) public static void configurePersistenceUnitInfos(MappedConfigurationString,PersistenceUnitConfigurer cfg) { PersistenceUnitConfigurer configurer = new PersistenceUnitConfigurer() { public void configure(TapestryPersistenceUnitInfo unitInfo) { unitInfo.nonJtaDataSource(jdbc/JPATest) .addProperty(eclipselink.ddl-generation, create-tables) .addProperty(eclipselink.logging.level, fine); } }; cfg.add(JTAUnit, configurer); } @Contribute(JpaEntityPackageManager.class) public static void providePackages(ConfigurationString configuration) { configuration.add(com.bvision.authorization.openjpa.entities); } } My tests start the registry in the following way: private Registry constructRegistry(Class?... classes) { return RegistryBuilder.buildAndStartupRegistry(classes); } @BeforeClass public void setup() { this.registry = this.constructRegistry(OpenJPAAuthorizationModule.class, JpaModule.class, TapestryModule.class); this.userService = this.registry.getService(UserService.class); this.groupService = this.registry.getService(GroupService.class); this.roleService = this.registry.getService(RoleService.class); this.entitlementService = this.registry.getService(EntitlementService.class); this.authorizationService = this.registry.getService(AuthorizationService.class); } Finally, I'm getting the following exception: java.lang.RuntimeException
Tapestry-JPA Testing environment
Hi everybody, I am trying to set a POC application with Tapestry-JPA. I just have a couple of entities, services, and tests. This is not a webapp (yet), I'm just starting the registry manually from my test, I did it before, but now something is not working, I dont know if something has changed in the last version of Tapestry, or if I'm loosing something from tapestry-jpa module. I have the persistence.xml in src/test/resources/META-INF/persistence.xml My module configures the following: public class OpenJPAAuthorizationModule { public static void bind(ServiceBinder binder) { binder.bind(AuthorizationService.class, AuthorizationServiceImpl.class); binder.bind(UserService.class, UserServiceImpl.class); binder.bind(UserDAO.class, UserDAOImpl.class); binder.bind(RoleService.class, RoleServiceImpl.class); binder.bind(RoleDAO.class, RoleDAOImpl.class); binder.bind(GroupService.class, GroupServiceImpl.class); binder.bind(GroupDAO.class, GroupDAOImpl.class); binder.bind(EntitlementService.class, EntitlementServiceImpl.class); binder.bind(EntitlementDAO.class, EntitlementDAOImpl.class); } @Contribute(EntityManagerSource.class) public static void configurePersistenceUnitInfos(MappedConfigurationString,PersistenceUnitConfigurer cfg) { PersistenceUnitConfigurer configurer = new PersistenceUnitConfigurer() { public void configure(TapestryPersistenceUnitInfo unitInfo) { unitInfo.nonJtaDataSource(jdbc/JPATest) .addProperty(eclipselink.ddl-generation, create-tables) .addProperty(eclipselink.logging.level, fine); } }; cfg.add(JTAUnit, configurer); } @Contribute(JpaEntityPackageManager.class) public static void providePackages(ConfigurationString configuration) { configuration.add(com.bvision.authorization.openjpa.entities); } } My tests start the registry in the following way: private Registry constructRegistry(Class?... classes) { return RegistryBuilder.buildAndStartupRegistry(classes); } @BeforeClass public void setup() { this.registry = this.constructRegistry(OpenJPAAuthorizationModule.class, JpaModule.class, TapestryModule.class); this.userService = this.registry.getService(UserService.class); this.groupService = this.registry.getService(GroupService.class); this.roleService = this.registry.getService(RoleService.class); this.entitlementService = this.registry.getService(EntitlementService.class); this.authorizationService = this.registry.getService(AuthorizationService.class); } Finally, I'm getting the following exception: java.lang.RuntimeException: Exception constructing service 'RegistryStartup': Error invoking service contribution method org.apache.tapestry5.jpa.JpaModule.startupEarly(EntityManagerManager, boolean): Exception constructing service 'EntityManagerSource': Coercion of /META-INF/persistence.xml to type org.apache.tapestry5.ioc.Resource (via String -- org.apache.tapestry5.ioc.Resource) failed: Exception constructing service 'AssetSource': Error invoking constructor public org.apache.tapestry5.internal.services.AssetSourceImpl(org.apache.tapestry5.ioc.services.ThreadLocale,java.util.Map,org.apache.tapestry5.ioc.services.SymbolSource): Exception constructing service 'ContextAssetFactory': Error invoking method public org.apache.tapestry5.services.AssetFactory org.apache.tapestry5.services.TapestryModule.buildContextAssetFactory(org.apache.tapestry5.services.ApplicationGlobals,org.apache.tapestry5.services.assets.AssetPathConstructor,org.apache.tapestry5.services.AssetPathConverter): java.lang.AssertionError at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:75) at org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:54) at $Runnable_2b3a717d2dfc.delegate(Unknown Source) at $Runnable_2b3a717d2dfc.run(Unknown Source) at org.apache.tapestry5.ioc.internal.RegistryImpl.performRegistryStartup(RegistryImpl.java:325) at org.apache.tapestry5.ioc.internal.RegistryWrapper.performRegistryStartup(RegistryWrapper.java:80) at org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:213) at org.apache.tapestry5.ioc.RegistryBuilder.buildAndStartupRegistry(RegistryBuilder.java:229) at com.bvision.authorization.openjpa.services.OpenJPAAuthorizationTest.constructRegistry(OpenJPAAuthorizationTest.java:31) at com.bvision.authorization.openjpa.services.OpenJPAAuthorizationTest.setup(OpenJPAAuthorizationTest.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at
Re: Advisin Tapestry Session
Thank both of you! I'll analyze these options. Anyway, I am curious about why my approach is not working, I insist, is it a bug? Best regards, Matias. On Sun, Sep 23, 2012 at 10:58 AM, Matías Blasi matias.bl...@gmail.comwrote: Hi all, I'm trying to implement a mechanism to track each user session, at least the login and logout events. The login is easy, because it occurs in a defined place, but the logout can occurs explicitly or because of a timeout, so I thought in advising the Tapestry Session.invalidate() method: @SuppressWarnings(unchecked) @Advise(serviceInterface=org.apache.tapestry5.services.Session.class) public static void adviseUserActivity(final UserService userService, final MethodAdviceReceiver receiver) throws SecurityException, NoSuchMethodException { MethodAdvice advise = new MethodAdvice() { @Override public void advise(MethodInvocation invocation) { userService.endSession(userService.getCurrentUser().getUserName()); } }; receiver.adviseMethod(receiver.getInterface().getMethod(invalidate), advise); } But oddly, I'm getting the following error when starting up the application: Caused by: java.lang.RuntimeException: Error invoking method public static void com.app.services.AppModule.adviseUserActivity(com.app.core.services.UserService,org.apache.tapestry5.ioc.MethodAdviceReceiver) throws java.lang.SecurityException,java.lang.NoSuchMethodException: org.hibernate.Session.invalidate() at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:61) at org.apache.tapestry5.ioc.internal.util.LoggingInvokableWrapper.invoke(LoggingInvokableWrapper.java:42) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) ... 79 more Caused by: java.lang.NoSuchMethodException: org.hibernate.Session.invalidate() at java.lang.Class.getMethod(Class.java:1622) at com.app.services.AppModule.adviseUserActivity(AppModule.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:50) ... 81 more 2012-09-23 10:50:11.134::INFO: Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server Why is it trying to advise the org.hibernate.Sesssion.invalidate() method if I explicitly annotated: @Advise(serviceInterface=org.apache.tapestry5.services.Session.class), is it a bug? Anyway, do you think this is the best way of doing this, or is there any other better mechanism to intercept a finished session? Best regards, Matias.
Re: Advisin Tapestry Session
Thanks Thiago, It is a surprise for me! Because, it is into the services package... and I'd be pretty sure about injecting it... but I would be wrong Anyway, something is confusing me, because my @Advise annotation is explicitly pointing to this interface: @Advise(serviceInterface=org.apache.tapestry5.services.Session.class) So, I don't understand why tap is trying to advise the hibernate-session. Best regards, Matias. On Tue, Sep 25, 2012 at 10:31 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 25 Sep 2012 10:03:04 -0300, Matías Blasi matias.bl...@gmail.com wrote: Thank both of you! I'll analyze these options. Anyway, I am curious about why my approach is not working, I insist, is it a bug? Session is not a service, so it cannot be advised. -- Thiago H. de Paula Figueiredo
Re: Advisin Tapestry Session
Thanks, done: https://issues.apache.org/jira/browse/TAP5-2002! Best regards, Matias. On Tue, Sep 25, 2012 at 11:17 AM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Tue, 25 Sep 2012 10:56:03 -0300, Matías Blasi matias.bl...@gmail.com wrote: Thanks Thiago, De nada! :) It is a surprise for me! Because, it is into the services package... and I'd be pretty sure about injecting it... but I would be wrong In this case, you're wrong. :) Not everything that is in the services package is a Tapestry-IoC service. It needs to be declared as such. And there are stuff that is injectable but isn't a service. Tapestry-IoC calls them resources. Anyway, something is confusing me, because my @Advise annotation is explicitly pointing to this interface: @Advise(serviceInterface=org.**apache.tapestry5.services.**Session.class) So, I don't understand why tap is trying to advise the hibernate-session. As Lance said, this looks like a bug. Could you file a JIRA please? -- Thiago H. de Paula Figueiredo
Advisin Tapestry Session
Hi all, I'm trying to implement a mechanism to track each user session, at least the login and logout events. The login is easy, because it occurs in a defined place, but the logout can occurs explicitly or because of a timeout, so I thought in advising the Tapestry Session.invalidate() method: @SuppressWarnings(unchecked) @Advise(serviceInterface=org.apache.tapestry5.services.Session.class) public static void adviseUserActivity(final UserService userService, final MethodAdviceReceiver receiver) throws SecurityException, NoSuchMethodException { MethodAdvice advise = new MethodAdvice() { @Override public void advise(MethodInvocation invocation) { userService.endSession(userService.getCurrentUser().getUserName()); } }; receiver.adviseMethod(receiver.getInterface().getMethod(invalidate), advise); } But oddly, I'm getting the following error when starting up the application: Caused by: java.lang.RuntimeException: Error invoking method public static void com.app.services.AppModule.adviseUserActivity(com.app.core.services.UserService,org.apache.tapestry5.ioc.MethodAdviceReceiver) throws java.lang.SecurityException,java.lang.NoSuchMethodException: org.hibernate.Session.invalidate() at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:61) at org.apache.tapestry5.ioc.internal.util.LoggingInvokableWrapper.invoke(LoggingInvokableWrapper.java:42) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) ... 79 more Caused by: java.lang.NoSuchMethodException: org.hibernate.Session.invalidate() at java.lang.Class.getMethod(Class.java:1622) at com.app.services.AppModule.adviseUserActivity(AppModule.java:198) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tapestry5.ioc.internal.util.MethodInvoker.invoke(MethodInvoker.java:50) ... 81 more 2012-09-23 10:50:11.134::INFO: Started SelectChannelConnector@0.0.0.0:8080 [INFO] Started Jetty Server Why is it trying to advise the org.hibernate.Sesssion.invalidate() method if I explicitly annotated: @Advise(serviceInterface=org.apache.tapestry5.services.Session.class), is it a bug? Anyway, do you think this is the best way of doing this, or is there any other better mechanism to intercept a finished session? Best regards, Matias.
Re: How to override a component message
Hi all, I'd like to know if my question is clear, because I can't resolve it yet, and I think that I should be missing something obvious... A component has a t:label t:for=userName/, the same component defines userName-label in its component.properties, and I don't know how to override that property... I tried in everywhere, my own component_es.properties, my app_es.properties, I don't know who has more hierarchy in the properties resolution than the component' own properties file. I filed an issue in jira: http://jira.codehaus.org/browse/TYNAMO-173 Best regards, Matias. On Thu, Aug 2, 2012 at 4:43 PM, Matías Blasi matias.bl...@gmail.com wrote: Thanks Alex, I have no problem for overriding error messages, I have a custom one which is working. But the field labes, uses a message binding with loginLabel key, and it is finding it in LoginForm.properties and I don't know where to override it. Best regards, Matias. On Thu, Aug 2, 2012 at 1:09 AM, Matías Blasi matias.bl...@gmail.comwrote: Hi all! I'm trying to override a message from the catalog of a component. It is the LoginForm from the tynamo-security-0.4.6. It includes a LoginForm.properties with loginLabel=Login. I added that message in my app_es.properties (loginLabel=Acceso) with no effect. What am I missing??? Thank you for any suggestion, Best regards, Matias.
Re: Ajax errors handling
Thank you very much Lenny! I'll research on the code. As far as I understood, that library does one of my two requirements (the ajax error redirection handling) I would like, to integrate the ajax-errors produced, with my client error messaging system (alerts/jgrowl) Is there any place to attach an errorHandler on the client side? Or a filter/or something to set in the server side, to add a javascript callback in the case of an error during ajax-requests? Best regards, Matias. On Sun, Aug 5, 2012 at 11:56 PM, Matías Blasi matias.bl...@gmail.comwrote: Hi all, I'm interested on handling ajax requests errors in some way to integrate them with the alerts mechanism (jGrowl) if its possible. I think that I should contribute some errorHandler to the tapestry javascript library, am I right? Also, it would be usefull to detect a session expired/forbiden http errors in any ajax call and redirect to the login page. I think if I have the hook for handling the messages I could choiche if I have to show it or do something. My application is fully integrated with got5-jquery, I think that it should matter. Finally, I'm using tapestry-5.3.4. Best regards, Matias.
Re: How to override a component message
Thank you Howard! I got it working now! Regards, Matias. On Mon, Aug 6, 2012 at 12:21 PM, Matías Blasi matias.bl...@gmail.comwrote: Hi all, I'd like to know if my question is clear, because I can't resolve it yet, and I think that I should be missing something obvious... A component has a t:label t:for=userName/, the same component defines userName-label in its component.properties, and I don't know how to override that property... I tried in everywhere, my own component_es.properties, my app_es.properties, I don't know who has more hierarchy in the properties resolution than the component' own properties file. I filed an issue in jira: http://jira.codehaus.org/browse/TYNAMO-173 Best regards, Matias. On Thu, Aug 2, 2012 at 4:43 PM, Matías Blasi matias.bl...@gmail.comwrote: Thanks Alex, I have no problem for overriding error messages, I have a custom one which is working. But the field labes, uses a message binding with loginLabel key, and it is finding it in LoginForm.properties and I don't know where to override it. Best regards, Matias. On Thu, Aug 2, 2012 at 1:09 AM, Matías Blasi matias.bl...@gmail.comwrote: Hi all! I'm trying to override a message from the catalog of a component. It is the LoginForm from the tynamo-security-0.4.6. It includes a LoginForm.properties with loginLabel=Login. I added that message in my app_es.properties (loginLabel=Acceso) with no effect. What am I missing??? Thank you for any suggestion, Best regards, Matias.
Ajax errors handling
Hi all, I'm interested on handling ajax requests errors in some way to integrate them with the alerts mechanism (jGrowl) if its possible. I think that I should contribute some errorHandler to the tapestry javascript library, am I right? Also, it would be usefull to detect a session expired/forbiden http errors in any ajax call and redirect to the login page. I think if I have the hook for handling the messages I could choiche if I have to show it or do something. My application is fully integrated with got5-jquery, I think that it should matter. Finally, I'm using tapestry-5.3.4. Best regards, Matias.
Re: How to override a component message
Thanks Alex, I have no problem for overriding error messages, I have a custom one which is working. But the field labes, uses a message binding with loginLabel key, and it is finding it in LoginForm.properties and I don't know where to override it. Best regards, Matias. On Thu, Aug 2, 2012 at 1:09 AM, Matías Blasi matias.bl...@gmail.com wrote: Hi all! I'm trying to override a message from the catalog of a component. It is the LoginForm from the tynamo-security-0.4.6. It includes a LoginForm.properties with loginLabel=Login. I added that message in my app_es.properties (loginLabel=Acceso) with no effect. What am I missing??? Thank you for any suggestion, Best regards, Matias.
How to override a component message
Hi all! I'm trying to override a message from the catalog of a component. It is the LoginForm from the tynamo-security-0.4.6. It includes a LoginForm.properties with loginLabel=Login. I added that message in my app_es.properties (loginLabel=Acceso) with no effect. What am I missing??? Thank you for any suggestion, Best regards, Matias.
Shared @SessionState???
Hi all, I'm facing the following issue: I have a @SessionState object for a custom type. As far as I understand that would be handled individually for each user session, but I am seeing that the value is shared across all my user sessions... It shouldn't be possible, in fact, if it works like that we couldn't implement a shopping cart with this mechanism and I had a shopping cart working fine in my application! Do you imagine what could be wrong to get this behaiviour? I cant imagine how implement a cross-SessionState without external persistence... Here is my code: public class CalificadosMessagesServiceImpl implements CalificadosMessagesService { @SessionState(create=true) private CalificadosMessagesBag messagesBag; ... ... @Override public ListCalificadosMessage getSessoinMessages() { return this.messagesBag.getMessages(); } @Override public void recordSessionMessage(CalificadosMessage message) { this.messagesBag.addMessage(message); } ... ... } All the logged users (from different browsers), get the same messages! Am I loosing something obvious? Regards, Matias.
Re: Shared @SessionState???
Thank all of you! That was the problem. It worked by asking for my SessionState object to the AplicationStateManager and setting my service as Threaded. Thank you very much. Regards! Matias. On Thu, Jul 26, 2012 at 10:10 AM, Matías Blasi matias.bl...@gmail.comwrote: Hi all, I'm facing the following issue: I have a @SessionState object for a custom type. As far as I understand that would be handled individually for each user session, but I am seeing that the value is shared across all my user sessions... It shouldn't be possible, in fact, if it works like that we couldn't implement a shopping cart with this mechanism and I had a shopping cart working fine in my application! Do you imagine what could be wrong to get this behaiviour? I cant imagine how implement a cross-SessionState without external persistence... Here is my code: public class CalificadosMessagesServiceImpl implements CalificadosMessagesService { @SessionState(create=true) private CalificadosMessagesBag messagesBag; ... ... @Override public ListCalificadosMessage getSessoinMessages() { return this.messagesBag.getMessages(); } @Override public void recordSessionMessage(CalificadosMessage message) { this.messagesBag.addMessage(message); } ... ... } All the logged users (from different browsers), get the same messages! Am I loosing something obvious? Regards, Matias.
AjaxFormLoop containing a component with @Import
Hi all! If the body of the AjaxFormLoop includes a component with @Import(library={...}) annotation (like datefield) the addRow event is fired but no update occurs in the client-side. My application is got5-jquery fully integrated. I don't know if this happens with no got5-jquery, but I think it should work, because of http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/formloop1. I experienced the issue with tapestry-*-5.3.4/got5-jquery-3.3.1-SNAPSHOT and tapestry-*-5.3.3/got5-jquery-3.3.0. Did you expirienced this issue? Am I loosing something obvious? Or is there a workaround for this? I'll appreciate any suggestion or comment. Best regards, Matias.
Re: How to know when an Alert is dismissed
Thank you again Lance! Thats exactly what I need. Regards, Matias. On Wed, Jun 27, 2012 at 11:34 PM, Matías Blasi matias.bl...@gmail.comwrote: Thank you Lance! This seems to be useful, but as far as I understand, it couldn't be possible to handle single Alert dismission, right? Regards, Matias. On Wed, Jun 27, 2012 at 6:03 PM, Matías Blasi matias.bl...@gmail.comwrote: Hi, I recently upgraded to tapestry-5.3.3, and I am trying to replace my own user-messages component with the great Alerts one. My problem is that I need to know when a UNTIL_DISMISSED Alert is dismissed. It is because I mark it as read in a database, because the Alerts are generated for the users by an internal process either the user is online or not. So, my Alerts has a 'target' attribute. I'm handling all this logic pretty well, but I dont know how to override, or intercept the dismiss operation, because it is not handled by a Service, it is resolved between the Alerts component and the AlertStorage object. Suggestions will be appreciated. Regards, Matias.
How to know when an Alert is dismissed
Hi, I recently upgraded to tapestry-5.3.3, and I am trying to replace my own user-messages component with the great Alerts one. My problem is that I need to know when a UNTIL_DISMISSED Alert is dismissed. It is because I mark it as read in a database, because the Alerts are generated for the users by an internal process either the user is online or not. So, my Alerts has a 'target' attribute. I'm handling all this logic pretty well, but I dont know how to override, or intercept the dismiss operation, because it is not handled by a Service, it is resolved between the Alerts component and the AlertStorage object. Suggestions will be appreciated. Regards, Matias.
Re: How to know when an Alert is dismissed
Thank you Lance! This seems to be useful, but as far as I understand, it couldn't be possible to handle single Alert dismission, right? Regards, Matias. On Wed, Jun 27, 2012 at 6:03 PM, Matías Blasi matias.bl...@gmail.comwrote: Hi, I recently upgraded to tapestry-5.3.3, and I am trying to replace my own user-messages component with the great Alerts one. My problem is that I need to know when a UNTIL_DISMISSED Alert is dismissed. It is because I mark it as read in a database, because the Alerts are generated for the users by an internal process either the user is online or not. So, my Alerts has a 'target' attribute. I'm handling all this logic pretty well, but I dont know how to override, or intercept the dismiss operation, because it is not handled by a Service, it is resolved between the Alerts component and the AlertStorage object. Suggestions will be appreciated. Regards, Matias.