Last visited pages
Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold
Re: Last visited pages
Hi, I don't really see the difference between my module tapestry-breadcrumbs and what you are looking for. What is missing from tapestry-breadcrumbs for you to use it? Maybe it can be added? Regards, Joakim On Wed, Aug 10, 2011 at 8:04 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Last visited pages
Hello Joakim I am also working on Gerolds project. The difference is that we do not only need a static string (or message key) for a single page, but dynamic text depending on what entity is shown on the page. Consider the page BusinessPartnerDetail. Your breadcrumb-implementation would show businesspartner.page.title for each business partner I opened. What we need is different, we need to have Businesspartner Hans Huber, Businesspartner Joakim Olsson, ... (what Gerold described as 'summary') Unfortunately we don't see a way to get this data, since the Dispatcher is called before the page is initialzed (before the onActivate methods are called), and therefore we cannot access this information. Any idea on how to achieve that? Best regards, Dominik 2011/8/10 Joakim Olsson joa...@unbound.se Hi, I don't really see the difference between my module tapestry-breadcrumbs and what you are looking for. What is missing from tapestry-breadcrumbs for you to use it? Maybe it can be added? Regards, Joakim On Wed, Aug 10, 2011 at 8:04 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Freundliche Grüße / Best regards, Dominik Hurnaus *C *a t a l y s t s Software Engineer Mobil: +43 (650) 723 6 723 dominik.hurn...@catalysts.cc www.catalysts.cc Ottensheimer Straße 27, A-4040 Linz *task**mind** ** ... Aufgaben im Team erledigen** www.taskmind.net* http://www.taskmind.net/ Catalysts GmbH, Firmensitz: 4232 Hagenberg, Firmenbuchnummer: FN 292140v beim Landesgericht Linz
Re: Last visited pages
Aaaah...I understand. Let me think on that one for a little while. I don't see a solution right now. /Joakim On Wed, Aug 10, 2011 at 8:56 AM, Dominik Hurnaus dominik.hurn...@gmail.com wrote: Hello Joakim I am also working on Gerolds project. The difference is that we do not only need a static string (or message key) for a single page, but dynamic text depending on what entity is shown on the page. Consider the page BusinessPartnerDetail. Your breadcrumb-implementation would show businesspartner.page.title for each business partner I opened. What we need is different, we need to have Businesspartner Hans Huber, Businesspartner Joakim Olsson, ... (what Gerold described as 'summary') Unfortunately we don't see a way to get this data, since the Dispatcher is called before the page is initialzed (before the onActivate methods are called), and therefore we cannot access this information. Any idea on how to achieve that? Best regards, Dominik 2011/8/10 Joakim Olsson joa...@unbound.se Hi, I don't really see the difference between my module tapestry-breadcrumbs and what you are looking for. What is missing from tapestry-breadcrumbs for you to use it? Maybe it can be added? Regards, Joakim On Wed, Aug 10, 2011 at 8:04 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Freundliche Grüße / Best regards, Dominik Hurnaus *C *a t a l y s t s Software Engineer Mobil: +43 (650) 723 6 723 dominik.hurn...@catalysts.cc www.catalysts.cc Ottensheimer Straße 27, A-4040 Linz *task**mind** ** ... Aufgaben im Team erledigen** www.taskmind.net* http://www.taskmind.net/ Catalysts GmbH, Firmensitz: 4232 Hagenberg, Firmenbuchnummer: FN 292140v beim Landesgericht Linz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: what is called when - ajax version
However, there's still the possibility that these are useful ... except that all the use cases I can come up with are better served by a perthread scoped service, rather than associated with the page instance. I am using them for a one time setup of tab groups (essentially linkedhashmaps) in pages, and I find it to be a good fit for my purposes... of course there are several workarounds so its not essential to use pageAttached / pageDetached. Never thought of of using a perthread scoped service though. Regards, Peter - Original Message - From: Howard Lewis Ship hls...@gmail.com To: Tapestry users users@tapestry.apache.org Sent: Tuesday, 9 August, 2011 21:36:11 GMT +02:00 Athens, Beirut, Bucharest, Istanbul Subject: Re: what is called when - ajax version On Tue, Aug 9, 2011 at 7:23 AM, Lenny Primak lpri...@hope.nyc.ny.us wrote: pageAttached/pageDetatched are being obsoleyed in the future versions of tapestry. I would use setupRender instead. If there are valid uses for pageAttached / pageDetached then they can stay. Some people do use them for things that should properly be done inside the page's activate event handler, or inside a setupRender render phase method. However, there's still the possibility that these are useful ... except that all the use cases I can come up with are better served by a perthread scoped service, rather than associated with the page instance. On Aug 9, 2011, at 8:09 AM, Paul Stanton p...@mapshed.com.au wrote: Geoff, Thanks again, you are always helpful! Looks like pageAttached/pageDetached is exactly what i need. Combined with isXHR, works fine. I hadn't stumbled across this doc: http://tapestry.apache.org/page-life-cycle.html cheers, p. On 24/07/2011 10:37 PM, Geoff Callender wrote: Done - new example AJAX: What is Called and When added as: http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/whatiscalledandwhen However, I don't know that it helps solve your problem, unless maybe you test request.isXHR() in pageAttached() and pageDetached()??? Geoff On 18/07/2011, at 11:05 AM, Paul Stanton wrote: In the past, I've found the what is called when example from the jumpstart collection very useful, however there is no version for the partial render or ajax case. I'm trying to figure out if there is an event I can handle which is called everytime a partial render or zone update is returned to the client, or everytime an asych request is made. Is there such a hook? regards, Paul. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5.3: customize validation messages (2)
Hm, I just noticed that on deployment this line appears in the logs: /Could not add object with duplicate id 'ValidationMessages'. The duplicate object has been ignored./ So what am I supposed to do - contribute my customized validation messages at first somehow or use a different id? -- View this message in context: http://tapestry.1045711.n5.nabble.com/T5-3-customize-validation-messages-2-tp4681506p4685253.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Last visited pages
Hi, I did something related and looked at org.apache.tapestry5.internal.transform.CachedWorker for inspiration. Basically you need access to BindingSource.. (Just put in in ComponentClassTransformWorker constructor) --from CachedWorker-- Binding binding = bindingSource.newBinding(@Cached watch, invocation.getComponentResources(), BindingConstants.PROP, watch); then call binding.get(); 'watch' is what you get from annotation like in your case prop:summary or prop:context Hope this is of some help cheers Magnus On Wed, Aug 10, 2011 at 8:56 AM, Dominik Hurnaus dominik.hurn...@gmail.comwrote: Hello Joakim I am also working on Gerolds project. The difference is that we do not only need a static string (or message key) for a single page, but dynamic text depending on what entity is shown on the page. Consider the page BusinessPartnerDetail. Your breadcrumb-implementation would show businesspartner.page.title for each business partner I opened. What we need is different, we need to have Businesspartner Hans Huber, Businesspartner Joakim Olsson, ... (what Gerold described as 'summary') Unfortunately we don't see a way to get this data, since the Dispatcher is called before the page is initialzed (before the onActivate methods are called), and therefore we cannot access this information. Any idea on how to achieve that? Best regards, Dominik 2011/8/10 Joakim Olsson joa...@unbound.se Hi, I don't really see the difference between my module tapestry-breadcrumbs and what you are looking for. What is missing from tapestry-breadcrumbs for you to use it? Maybe it can be added? Regards, Joakim On Wed, Aug 10, 2011 at 8:04 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/ ). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Freundliche Grüße / Best regards, Dominik Hurnaus *C *a t a l y s t s Software Engineer Mobil: +43 (650) 723 6 723 dominik.hurn...@catalysts.cc www.catalysts.cc Ottensheimer Straße 27, A-4040 Linz *task**mind** ** ... Aufgaben im Team erledigen** www.taskmind.net* http://www.taskmind.net/ Catalysts GmbH, Firmensitz: 4232 Hagenberg, Firmenbuchnummer: FN 292140v beim Landesgericht Linz
Re: Last visited pages
Dough... I missed the part with dispatcher! Thought it was a regular ComponentClassTransformWorker. Sorry guys. Not sure how to do that on top of my head... Will let you know if I think of any --magnus On Wed, Aug 10, 2011 at 12:28 PM, Magnus Kvalheim mag...@kvalheim.dkwrote: Hi, I did something related and looked at org.apache.tapestry5.internal.transform.CachedWorker for inspiration. Basically you need access to BindingSource.. (Just put in in ComponentClassTransformWorker constructor) --from CachedWorker-- Binding binding = bindingSource.newBinding(@Cached watch, invocation.getComponentResources(), BindingConstants.PROP, watch); then call binding.get(); 'watch' is what you get from annotation like in your case prop:summary or prop:context Hope this is of some help cheers Magnus On Wed, Aug 10, 2011 at 8:56 AM, Dominik Hurnaus dominik.hurn...@gmail.com wrote: Hello Joakim I am also working on Gerolds project. The difference is that we do not only need a static string (or message key) for a single page, but dynamic text depending on what entity is shown on the page. Consider the page BusinessPartnerDetail. Your breadcrumb-implementation would show businesspartner.page.title for each business partner I opened. What we need is different, we need to have Businesspartner Hans Huber, Businesspartner Joakim Olsson, ... (what Gerold described as 'summary') Unfortunately we don't see a way to get this data, since the Dispatcher is called before the page is initialzed (before the onActivate methods are called), and therefore we cannot access this information. Any idea on how to achieve that? Best regards, Dominik 2011/8/10 Joakim Olsson joa...@unbound.se Hi, I don't really see the difference between my module tapestry-breadcrumbs and what you are looking for. What is missing from tapestry-breadcrumbs for you to use it? Maybe it can be added? Regards, Joakim On Wed, Aug 10, 2011 at 8:04 AM, Gerold Glaser gerold.gla...@gmail.com wrote: Dear Listeners! In our application we want to track the pages a user has visited and provide a last visited object widget in the application for faster access. Our idea was to provide an Annotation @LastVisitedPage on the page to mark the pages that should be included in the history (like it is done in the breadcrumb project of https://github.com/argoyle/tapestry-breadcrumbs/). The text shown in the last visited object should be rendered by the page due to performance and translation purposes. The track should be written after the page is rendererd. @LastVisitedPage(summary=prop:summary, context=prop:context) public class PageA { private Bean bean; @Inject private Messages messages; @Inject private Repository repository; void onActivate(Long id) { this.bean = repository.loadBean(id); } public String getSummary() { return messages.get(translationfor.this.page) + + bean.getSummary(); } public Long getContext() { return bean.getId(); } } Is the following solution possible and could you provide an example for processing the properties? I don't know how to access the props from the Annotation in the Dispatcher. Best regards, Gerold - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Freundliche Grüße / Best regards, Dominik Hurnaus *C *a t a l y s t s Software Engineer Mobil: +43 (650) 723 6 723 dominik.hurn...@catalysts.cc www.catalysts.cc Ottensheimer Straße 27, A-4040 Linz *task**mind** ** ... Aufgaben im Team erledigen** www.taskmind.net* http://www.taskmind.net/ Catalysts GmbH, Firmensitz: 4232 Hagenberg, Firmenbuchnummer: FN 292140v beim Landesgericht Linz
Re: Zebra Grid in Tapestry 5.2.6
The nth-child approach won't work on IE 6, 7 8, I believe. Bob Harner On Aug 9, 2011 9:15 AM, TG tapestry...@hotmail.com wrote: Dmitry, your solution works like a charm :) ! I think it is the simplest that works with Tapestry grid I have seen so far. Thanks a lot! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zebra-Grid-in-Tapestry-5-2-6-tp4680461p4681963.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ANN: Tapestry-tagselect version 1.0 released
So I'm seeing where my issue is based on your code. As indicated, I'd like to use this component as a replacement to a select menu, but here lies the problem. I have two tables, UserAccount and PurchaseRequest. There can only be one UserAccount per PurchaseRequest. I have a OneToMany from UserAccount to PurchaseRequest ManyToOne from PurchaseRequest to UserAccount. Within the template, I'm using PurchaseRequest as my object, so I'm unable to user a collection, only a single UserAccount object can be set. Looks as if I'm asking the component to do something it wasn't designed to do. Perhaps it would be a nice addition to the component if we could figure out how to resolve this issue. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4685978.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Issue while running Tapestry tutorial with JPA instead of Hibernate
Hi there, I have run the Hibernate version of the Tapestry tutorial: http://tapestry.apache.org/using-tapestry-with-hibernate.html and it works fine for me. I am now trying to integrate it with the new 5,3 Tapestry version, running JPA instead of Hibernate. I have read instructions at http://tapestry.apache.org/integrating-with-jpa.html, but I am not sure I understand how to put the different parts together. Since I no longer use Hibernate session, I have replaced in Index.java page: ... this code: /* @Inject private Session session; public ListAddress getAddresses() { return session.createCriteria(Address.class).list(); }*/ ... with this one: @PersistenceContext private EntityManager em; public ListAddress getAddresses() { Query query = em.createQuery(SELECT a FROM Address a); return query.getResultList(); } But I am getting this error in t:grid source=addresses/ of Index.tml: Render queue error in SetupRender[Index:grid]: Failure reading parameter 'source' of component Index:grid: org.apache.tapestry5.ioc.internal.util.TapestryException Could someone explain what is the issue in the above code? Also, could someone briefly list/describe the tasks which are needed to switch the Tapestry tutorial from Hibernate to JPA support. Regards Mat
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
Can you give a full exception listing? Also make sure your entities are in he correct entities package. On Aug 10, 2011, at 11:02 AM, mat -- mat...@gmail.com wrote: Hi there, I have run the Hibernate version of the Tapestry tutorial: http://tapestry.apache.org/using-tapestry-with-hibernate.html and it works fine for me. I am now trying to integrate it with the new 5,3 Tapestry version, running JPA instead of Hibernate. I have read instructions at http://tapestry.apache.org/integrating-with-jpa.html, but I am not sure I understand how to put the different parts together. Since I no longer use Hibernate session, I have replaced in Index.java page: ... this code: /* @Inject private Session session; public ListAddress getAddresses() { return session.createCriteria(Address.class).list(); }*/ ... with this one: @PersistenceContext private EntityManager em; public ListAddress getAddresses() { Query query = em.createQuery(SELECT a FROM Address a); return query.getResultList(); } But I am getting this error in t:grid source=addresses/ of Index.tml: Render queue error in SetupRender[Index:grid]: Failure reading parameter 'source' of component Index:grid: org.apache.tapestry5.ioc.internal.util.TapestryException Could someone explain what is the issue in the above code? Also, could someone briefly list/describe the tasks which are needed to switch the Tapestry tutorial from Hibernate to JPA support. Regards Mat - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
Hi Also make sure your entities are in he correct entities package -- I think I have same files structure as in the Tapestry tutorial: - Address.java in entities package - Index.java in pages package - CreateAddress.java in pages.address package - AppModule.java in services package Can you give a full exception listing --- Here is it: - locationclasspath:com/example/jpa/pages/Index.tml, line 29 - java.lang.NullPointerExceptionHide uninteresting stack framesStack trace - com.example.jpa.pages.Index.getAddresses(Index.java:33) - org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:328) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:427) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$BridgeTransformField$WrapFieldHandleForFieldValueConduitAsFieldConduit.get(BridgeClassTransformation.java:210) - org.apache.tapestry5.corelib.components.Grid.getfieldvalue_source(Grid.java) - org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:459) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:445) - org.apache.tapestry5.corelib.components.Grid$Shim_2ba81c88b285.invoke(Unknown Source) - org.apache.tapestry5.internal.plastic.MethodHandleImpl.invoke(MethodHandleImpl.java:48) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodHandleAsMethodAccess.invoke(BridgeClassTransformation.java:84) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodAdviceAsComponentMethodAdvice.advise(BridgeClassTransformation.java:348) - org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:230) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:191) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:237) - org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) - org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127) - org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) - org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:2147) - org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2131) - org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2113) - org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2098) - org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2084) - org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2066) - org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2047) - org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47) - org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67) - org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64) - org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2376) - org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) - org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) - org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:434) - com.example.jpa.services.AppModule$1.service(AppModule.java:94) - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) -
merging global message catalogs T5.2.5
Hi all! We have a WebApp and are currently developing a more or less similar App with extended / slightly changed functionality (yes a customized versision). Instead of CP we use inheritance through all technical layers (starting from Hibernate-DB over Spring-Services to T5-classes) to implement our changes which works just perfect. Perfect beside reuse / extending the global message catalog. Contribution of a second message catalog via public static void contributeApplicationDefaults(final MappedConfigurationString, String configuration) { configuration.add(SymbolConstants.APPLICATION_CATALOG, xy.properties); } fails, because T5 complains that the key already exists... Unfortunately I have to admit T5 is right in complaining :-) override is not an option as we loose our existing catalog thus 90% of the inherited UI shows missing key. I want to avoid the pain of page / component based messages if possible. Is there any way to merge catalogs between all *Modules? Do I have to override an internal T5 service and if so which one?? Or do I really have to CP all properties??? Any idea or hint is welcome Thanks in advance Jens - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: merging global message catalogs T5.2.5
On Wed, 10 Aug 2011 12:52:00 -0300, Jens Breitenstein mailingl...@j-b-s.de wrote: Hi all! Hi! public static void contributeApplicationDefaults(final MappedConfigurationString, String configuration) { configuration.add(SymbolConstants.APPLICATION_CATALOG, xy.properties); } Have you tried something like configuration.add(myproperties, xy.properties)? Your code is trying to add a second contribution with the same id, so use another. :) -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ANN: Tapestry-tagselect version 1.0 released
I found an example of what I was referring to with facebook. If you log into your account and edit profile, you'll see an option to edit your location / home town. It works exactly as desired. The way they handle languages is very nice and clean too. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686353.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: merging global message catalogs T5.2.5
You can contribute as many catalogs as you want. See the contribution to the ComponentMessagesSource service here: https://github.com/drobiazko/tapestry5inaction/blob/master/showcase/src/main/java/com/tapestry5inaction/services/AppModule.java On Wed, Aug 10, 2011 at 5:52 PM, Jens Breitenstein mailingl...@j-b-s.dewrote: Hi all! We have a WebApp and are currently developing a more or less similar App with extended / slightly changed functionality (yes a customized versision). Instead of CP we use inheritance through all technical layers (starting from Hibernate-DB over Spring-Services to T5-classes) to implement our changes which works just perfect. Perfect beside reuse / extending the global message catalog. Contribution of a second message catalog via public static void contributeApplicationDefaults(**final MappedConfigurationString, String configuration) { configuration.add(**SymbolConstants.APPLICATION_**CATALOG, xy.properties); } fails, because T5 complains that the key already exists... Unfortunately I have to admit T5 is right in complaining :-) override is not an option as we loose our existing catalog thus 90% of the inherited UI shows missing key. I want to avoid the pain of page / component based messages if possible. Is there any way to merge catalogs between all *Modules? Do I have to override an internal T5 service and if so which one?? Or do I really have to CP all properties??? Any idea or hint is welcome Thanks in advance Jens --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Best regards, Igor Drobiazko http://tapestry5.de
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
Looks like your PersistenceManager is null. You need to share some of your code with us in order to get help. On Wed, Aug 10, 2011 at 5:35 PM, mat -- mat...@gmail.com wrote: Hi Also make sure your entities are in he correct entities package -- I think I have same files structure as in the Tapestry tutorial: - Address.java in entities package - Index.java in pages package - CreateAddress.java in pages.address package - AppModule.java in services package Can you give a full exception listing --- Here is it: - locationclasspath:com/example/jpa/pages/Index.tml, line 29 - java.lang.NullPointerExceptionHide uninteresting stack framesStack trace - com.example.jpa.pages.Index.getAddresses(Index.java:33) - org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:328) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:427) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$BridgeTransformField$WrapFieldHandleForFieldValueConduitAsFieldConduit.get(BridgeClassTransformation.java:210) - org.apache.tapestry5.corelib.components.Grid.getfieldvalue_source(Grid.java) - org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:459) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:445) - org.apache.tapestry5.corelib.components.Grid$Shim_2ba81c88b285.invoke(Unknown Source) - org.apache.tapestry5.internal.plastic.MethodHandleImpl.invoke(MethodHandleImpl.java:48) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodHandleAsMethodAccess.invoke(BridgeClassTransformation.java:84) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodAdviceAsComponentMethodAdvice.advise(BridgeClassTransformation.java:348) - org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:230) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:191) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:237) - org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) - org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127) - org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) - org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:2147) - org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2131) - org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2113) - org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2098) - org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2084) - org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2066) - org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2047) - org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47) - org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67) - org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64) - org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2376) - org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) - org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) - org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) - org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:434) - com.example.jpa.services.AppModule$1.service(AppModule.java:94) -
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
I think your issue is environmental. What's your persistence.xml look like? AppModule.java? Do you get login messages int he logs for EclipseLink? What are the contents of your WEB-INF/lib? On Aug 10, 2011, at 12:27 PM, Igor Drobiazko wrote: Looks like your PersistenceManager is null. You need to share some of your code with us in order to get help. On Wed, Aug 10, 2011 at 5:35 PM, mat -- mat...@gmail.com wrote: Hi Also make sure your entities are in he correct entities package -- I think I have same files structure as in the Tapestry tutorial: - Address.java in entities package - Index.java in pages package - CreateAddress.java in pages.address package - AppModule.java in services package Can you give a full exception listing --- Here is it: - locationclasspath:com/example/jpa/pages/Index.tml, line 29 - java.lang.NullPointerExceptionHide uninteresting stack framesStack trace - com.example.jpa.pages.Index.getAddresses(Index.java:33) - org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:328) - org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:427) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$BridgeTransformField$WrapFieldHandleForFieldValueConduitAsFieldConduit.get(BridgeClassTransformation.java:210) - org.apache.tapestry5.corelib.components.Grid.getfieldvalue_source(Grid.java) - org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:459) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java:445) - org.apache.tapestry5.corelib.components.Grid$Shim_2ba81c88b285.invoke(Unknown Source) - org.apache.tapestry5.internal.plastic.MethodHandleImpl.invoke(MethodHandleImpl.java:48) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodHandleAsMethodAccess.invoke(BridgeClassTransformation.java:84) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117) - org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86) - org.apache.tapestry5.internal.transform.BridgeClassTransformation$WrapMethodAdviceAsComponentMethodAdvice.advise(BridgeClassTransformation.java:348) - org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86) - org.apache.tapestry5.corelib.components.Grid.setupRender(Grid.java) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:230) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:191) - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:237) - org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72) - org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127) - org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37) - org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:2147) - org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2131) - org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2113) - org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2098) - org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2084) - org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2066) - org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2047) - org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47) - org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67) - org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64) - org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2376) - org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) - org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) - org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) -
Re: merging global message catalogs T5.2.5
Wished I found that in your book (or I missed it?) Many thanks Igor, it works.. for all of you having the same problem. This is the contrib section based on Igor's solution: @Contribute(ComponentMessagesSource.class) public static void provideMessages(final @Value(/de/domain/client/xy.properties) Resource resource, final OrderedConfigurationResource configuration) { configuration.add(SymbolConstants.APPLICATION_CATALOG + .XY, resource); } CU Jens Am 10.08.11 18:20, schrieb Igor Drobiazko: You can contribute as many catalogs as you want. See the contribution to the ComponentMessagesSource service here: https://github.com/drobiazko/tapestry5inaction/blob/master/showcase/src/main/java/com/tapestry5inaction/services/AppModule.java On Wed, Aug 10, 2011 at 5:52 PM, Jens Breitensteinmailingl...@j-b-s.dewrote: Hi all! We have a WebApp and are currently developing a more or less similar App with extended / slightly changed functionality (yes a customized versision). Instead of CP we use inheritance through all technical layers (starting from Hibernate-DB over Spring-Services to T5-classes) to implement our changes which works just perfect. Perfect beside reuse / extending the global message catalog. Contribution of a second message catalog via public static void contributeApplicationDefaults(**final MappedConfigurationString, String configuration) { configuration.add(**SymbolConstants.APPLICATION_**CATALOG, xy.properties); } fails, because T5 complains that the key already exists... Unfortunately I have to admit T5 is right in complaining :-) override is not an option as we loose our existing catalog thus 90% of the inherited UI shows missing key. I want to avoid the pain of page / component based messages if possible. Is there any way to merge catalogs between all *Modules? Do I have to override an internal T5 service and if so which one?? Or do I really have to CP all properties??? Any idea or hint is welcome Thanks in advance Jens --**--**- To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.orgusers-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
Hi What's your persistence.xml look like? -- Here it it: (as per the JPA integration instruction)? ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; version=2.0 persistence-unit name=DemoUnit transaction-type=RESOURCE_LOCAL properties property name=javax.persistence.jdbc.driver value=org.h2.Driver / property name=javax.persistence.jdbc.url value=jdbc:h2:mem:test / property name=javax.persistence.jdbc.username value=sa / property name=eclipselink.ddl-generation value=create-tables/ property name=eclipselink.logging.level value=fine/ /properties /persistence-unit /persistence Where exactly should the persistence.xml file be located? In the doc it says: and is expected to be located on the classpath in the * META-INF* directory. Is that under the WEB-INF directory? Do you get login messages int he logs for EclipseLink? -- No. What are the contents of your WEB-INF/lib? -- There is no lib older under WEB-INF in my sample app? AppModule.java? -- Here is it (much the same as in the Hibernate / Tutorial sample app). (I didn't add any of the configuration code mentioned in the JPA instructions as I understood this was needed only in XML-less JPA configuration package com.example.jpa.services; import java.io.IOException; import org.apache.tapestry5.*; import org.apache.tapestry5.ioc.Configuration; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.OrderedConfiguration; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.annotations.Contribute; import org.apache.tapestry5.ioc.annotations.Local; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.RequestFilter; import org.apache.tapestry5.services.RequestHandler; import org.apache.tapestry5.services.Response; import org.slf4j.Logger; /** * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to * configure and extend Tapestry, or to place your own service definitions. */ public class AppModule { public static void bind(ServiceBinder binder) { // binder.bind(MyServiceInterface.class, MyServiceImpl.class); // Make bind() calls on the binder object to define most IoC services. // Use service builder methods (example below) when the implementation // is provided inline, or requires more initialization than simply // invoking the constructor. } public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just en (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma separated series of locale names; // the first locale name is the default when there's no reasonable match). configuration.add(SymbolConstants.SUPPORTED_LOCALES, en); // The factory default is true but during the early stages of an application // overriding to false is a good idea. In addition, this is often overridden // on the command line as -Dtapestry.production-mode=false configuration.add(SymbolConstants.PRODUCTION_MODE, false); // The application version number is incorprated into URLs for some // assets. Web browsers will cache assets because of the far future expires // header. If existing assets are changed, the version number should also // change, to force the browser to download new versions. configuration.add(SymbolConstants.APPLICATION_VERSION, 1.0-SNAPSHOT); } /** * This is a service definition, the service will be named TimingFilter. The interface, * RequestFilter, is used within the RequestHandler service pipeline, which is built from the * RequestHandler service configuration. Tapestry IoC is responsible for passing in an * appropriate Logger instance. Requests for static resources are handled at a higher level, so * this filter will only be invoked for Tapestry related requests. * * p * Service builder methods are useful when the implementation is inline as an inner class * (as here) or require some other kind of special initialization. In most cases, * use the static bind() method instead. * * p * If this method was named build, then the service id would be taken from the * service interface and would be RequestFilter. Since Tapestry already defines * a service named RequestFilter we use an explicit service id that we can reference * inside the contribution method. */
Re: ANN: Tapestry-tagselect version 1.0 released
I was thinking that it might be possible to have a check in the component if the value is a collection then I keep the existing behaviour and otherwise use it as a single value instead. I need to change the javascript a bit as well but it should be possible I think. I'll try to find some time for this tonight I think. :-) /Joakim On Wed, Aug 10, 2011 at 4:23 PM, George Christman gchrist...@cardaddy.com wrote: So I'm seeing where my issue is based on your code. As indicated, I'd like to use this component as a replacement to a select menu, but here lies the problem. I have two tables, UserAccount and PurchaseRequest. There can only be one UserAccount per PurchaseRequest. I have a OneToMany from UserAccount to PurchaseRequest ManyToOne from PurchaseRequest to UserAccount. Within the template, I'm using PurchaseRequest as my object, so I'm unable to user a collection, only a single UserAccount object can be set. Looks as if I'm asking the component to do something it wasn't designed to do. Perhaps it would be a nice addition to the component if we could figure out how to resolve this issue. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4685978.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ANN: Tapestry-tagselect version 1.0 released
That would be amazing if you got that working. I feel it would make for a much better UX. I'll check in with you tomorrow to see if you were able to make any progress. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686771.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: merging global message catalogs T5.2.5
On Wed, 10 Aug 2011 13:09:38 -0300, Jens Breitenstein mailingl...@j-b-s.de wrote: Hi Thiago! Hi! puh, this is more a less a real time chat not a mailinglist :-) That's definetely a plus of Tapestry. :) thanks for your answer, I tried it but it is not working. a) my global props are back (good 90% missing keys gone!!) b) my XY properties are now missing (10% back..) I know that there is a lot of hidden magic in T5 but how should the configuration. add assume it's a 2nd global message catalog when omiting the global message catalog key...? In this case there's not magic really. I can't check the Tapestry sources right now, but, as far as I can remember, the catalogs are chained: when a given key is not found in one, it checks its parent catalog. Have you tried adding after:* or before:* as sorting constraint in configuration.add()? -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: merging global message catalogs T5.2.5 (SOLVED)
Hi Thiago! thanks, it's solved (see my mail based on Igor's sample) Jens Am 10.08.11 21:07, schrieb Thiago H. de Paula Figueiredo: On Wed, 10 Aug 2011 13:09:38 -0300, Jens Breitenstein mailingl...@j-b-s.de wrote: Hi Thiago! Hi! puh, this is more a less a real time chat not a mailinglist :-) That's definetely a plus of Tapestry. :) thanks for your answer, I tried it but it is not working. a) my global props are back (good 90% missing keys gone!!) b) my XY properties are now missing (10% back..) I know that there is a lot of hidden magic in T5 but how should the configuration. add assume it's a 2nd global message catalog when omiting the global message catalog key...? In this case there's not magic really. I can't check the Tapestry sources right now, but, as far as I can remember, the catalogs are chained: when a given key is not found in one, it checks its parent catalog. Have you tried adding after:* or before:* as sorting constraint in configuration.add()? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Reusing form from CreateSomeBean on EditSomeBean
Hello, guys, I`m trying to reuse the beaneditform I`ve came up with for one of my pages, whose responsibility is to CreateSomeBean. I would like to make the core form a compontent so that I could use it either on the CreateSomeBean as on the EditSomeBean page. Is there a tutorial or how to that points out how this can be accomplished? Thanks, Eric Torti
Re: Reusing form from CreateSomeBean on EditSomeBean
On Wed, 10 Aug 2011 16:38:17 -0300, Eric Torti ericzu...@gmail.com wrote: Hello, guys, Hi! I`m trying to reuse the beaneditform I`ve came up with for one of my pages, whose responsibility is to CreateSomeBean. I would like to make the core form a compontent so that I could use it either on the CreateSomeBean as on the EditSomeBean page. Is there a tutorial or how to that points out how this can be accomplished? Check this: http://tapestry.apache.org/component-classes.html -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
If you are not getting the eclipse link login messages it's not going to work. The file is supposed to be in classpath/META-INF directory. Not web-inf. Whatever your source package is just add META-INF To that. Also what's your content of the WEB-INF/lib directory? The lack or incorrect libraries may also hurt you. On Aug 10, 2011, at 2:03 PM, mat -- mat...@gmail.com wrote: Hi What's your persistence.xml look like? -- Here it it: (as per the JPA integration instruction)? ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; version=2.0 persistence-unit name=DemoUnit transaction-type=RESOURCE_LOCAL properties property name=javax.persistence.jdbc.driver value=org.h2.Driver / property name=javax.persistence.jdbc.url value=jdbc:h2:mem:test / property name=javax.persistence.jdbc.username value=sa / property name=eclipselink.ddl-generation value=create-tables/ property name=eclipselink.logging.level value=fine/ /properties /persistence-unit /persistence Where exactly should the persistence.xml file be located? In the doc it says: and is expected to be located on the classpath in the * META-INF* directory. Is that under the WEB-INF directory? Do you get login messages int he logs for EclipseLink? -- No. What are the contents of your WEB-INF/lib? -- There is no lib older under WEB-INF in my sample app? AppModule.java? -- Here is it (much the same as in the Hibernate / Tutorial sample app). (I didn't add any of the configuration code mentioned in the JPA instructions as I understood this was needed only in XML-less JPA configuration package com.example.jpa.services; import java.io.IOException; import org.apache.tapestry5.*; import org.apache.tapestry5.ioc.Configuration; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.OrderedConfiguration; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.annotations.Contribute; import org.apache.tapestry5.ioc.annotations.Local; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.RequestFilter; import org.apache.tapestry5.services.RequestHandler; import org.apache.tapestry5.services.Response; import org.slf4j.Logger; /** * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to * configure and extend Tapestry, or to place your own service definitions. */ public class AppModule { public static void bind(ServiceBinder binder) { // binder.bind(MyServiceInterface.class, MyServiceImpl.class); // Make bind() calls on the binder object to define most IoC services. // Use service builder methods (example below) when the implementation // is provided inline, or requires more initialization than simply // invoking the constructor. } public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just en (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma separated series of locale names; // the first locale name is the default when there's no reasonable match). configuration.add(SymbolConstants.SUPPORTED_LOCALES, en); // The factory default is true but during the early stages of an application // overriding to false is a good idea. In addition, this is often overridden // on the command line as -Dtapestry.production-mode=false configuration.add(SymbolConstants.PRODUCTION_MODE, false); // The application version number is incorprated into URLs for some // assets. Web browsers will cache assets because of the far future expires // header. If existing assets are changed, the version number should also // change, to force the browser to download new versions. configuration.add(SymbolConstants.APPLICATION_VERSION, 1.0-SNAPSHOT); } /** * This is a service definition, the service will be named TimingFilter. The interface, * RequestFilter, is used within the RequestHandler service pipeline, which is built from the * RequestHandler service configuration. Tapestry IoC is responsible for passing in an * appropriate Logger instance. Requests for static resources are handled at a higher level, so * this filter will only be invoked for Tapestry related requests. * * p * Service builder methods are useful when the implementation is inline as an inner class *
strange situation
Hi! I have a strange situation to share with you: a weird page appear when some users try to load some page of my tapestry application: a lot of strange symbols appear instead of the correct page. But if they try again (or if they reload the page with F5) the correct page appear. This happen very rarely and I can not reproduce it... I have attached a screenshot for review. Just out of curiosity, has this ever happened to anyone else? Tapestry version: 5.2.5 Server: Tomcat 6 Browser: Firefox 4 -- David Germán Canteros - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: strange situation
I believe this was a bug where under certain circumstances, a corrupt GZIP stream of page content would be streamed to the client; this is fixed in 5.2.6 for sure, but I thought it was fixed in 5.2.5 as well. Failing that, you need to be sure its Tapestry generating the corrupt content, rather than some other server in the middle (perhaps a firewall). This isn't about shifting the blame, but merely about understanding the problem before looking for a fix. On Wed, Aug 10, 2011 at 1:56 PM, David Canteros davidcanteros@gmail.com wrote: Hi! I have a strange situation to share with you: a weird page appear when some users try to load some page of my tapestry application: a lot of strange symbols appear instead of the correct page. But if they try again (or if they reload the page with F5) the correct page appear. This happen very rarely and I can not reproduce it... I have attached a screenshot for review. Just out of curiosity, has this ever happened to anyone else? Tapestry version: 5.2.5 Server: Tomcat 6 Browser: Firefox 4 -- David Germán Canteros - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Does message catalog retrieval look at containing component/page catalogs?
Hi all, When you supply a message key, does Tapestry 5.1 scan the catalogs of containing components and/or pages? For example, if Index.tml contained component Foobar, and Foobar.tml had a TextField with a t:id=xyzzy, would Index.properties get hit for xyzzy-label after Foobar.properties gets examined? It doesn't seem to (I know it looks at base class and the app catalogs). I'm doing a one-off component and it seems clunky to have to make a new properties file just for one or two labels or error messages. I searched the mailing list and didn't seem to find anything discussing this. Thanks, Les Baker - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Issue while running Tapestry tutorial with JPA instead of Hibernate
Thanks! I added ejb3-persistence and eclipselink dependencies to my pom.xml file. So presumably I now have all required dependencies, although I still don't see any Eclipse Link login messages in console... Q: Are there other required dependencies which are not already mentioned in the Hibernate version of the Tapestry Tutorial? Two other questions, regarding the JPA integration doc: 1) In the doc it is mentinoned that the JPA integration library defines the @CommitAfter annotation, which acts as the correspondent annotation from the Hibernate integration library. Q: Should one keep the tapestry-hibernate dependency when integrating with JPA: import org.apache.tapestry5.hibernate.annotations.CommitAfter? if not, how to resolve the @CommitAfter annotation? 2) The *without* XML configuration code refers to a contribution to the * EntityManagerSource* service, which is responsible for creating the EntityManagerFactoryhttp://download.oracle.com/javaee/6/api/javax/persistence/EntityManagerFactory.html to be used to create EntityManagerhttp://download.oracle.com/javaee/6/api/javax/persistence/EntityManager.html . Q: should this service be seen in the Tapestry IoC Services Status? Mat On Wed, Aug 10, 2011 at 10:50 PM, Lenny Primak lpri...@hope.nyc.ny.uswrote: If you are not getting the eclipse link login messages it's not going to work. The file is supposed to be in classpath/META-INF directory. Not web-inf. Whatever your source package is just add META-INF To that. Also what's your content of the WEB-INF/lib directory? The lack or incorrect libraries may also hurt you. On Aug 10, 2011, at 2:03 PM, mat -- mat...@gmail.com wrote: Hi What's your persistence.xml look like? -- Here it it: (as per the JPA integration instruction)? ?xml version=1.0 encoding=UTF-8? persistence xmlns=http://java.sun.com/xml/ns/persistence; version=2.0 persistence-unit name=DemoUnit transaction-type=RESOURCE_LOCAL properties property name=javax.persistence.jdbc.driver value=org.h2.Driver / property name=javax.persistence.jdbc.url value=jdbc:h2:mem:test / property name=javax.persistence.jdbc.username value=sa / property name=eclipselink.ddl-generation value=create-tables/ property name=eclipselink.logging.level value=fine/ /properties /persistence-unit /persistence Where exactly should the persistence.xml file be located? In the doc it says: and is expected to be located on the classpath in the * META-INF* directory. Is that under the WEB-INF directory? Do you get login messages int he logs for EclipseLink? -- No. What are the contents of your WEB-INF/lib? -- There is no lib older under WEB-INF in my sample app? AppModule.java? -- Here is it (much the same as in the Hibernate / Tutorial sample app). (I didn't add any of the configuration code mentioned in the JPA instructions as I understood this was needed only in XML-less JPA configuration package com.example.jpa.services; import java.io.IOException; import org.apache.tapestry5.*; import org.apache.tapestry5.ioc.Configuration; import org.apache.tapestry5.ioc.MappedConfiguration; import org.apache.tapestry5.ioc.OrderedConfiguration; import org.apache.tapestry5.ioc.ServiceBinder; import org.apache.tapestry5.ioc.annotations.Contribute; import org.apache.tapestry5.ioc.annotations.Local; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.RequestFilter; import org.apache.tapestry5.services.RequestHandler; import org.apache.tapestry5.services.Response; import org.slf4j.Logger; /** * This module is automatically included as part of the Tapestry IoC Registry, it's a good place to * configure and extend Tapestry, or to place your own service definitions. */ public class AppModule { public static void bind(ServiceBinder binder) { // binder.bind(MyServiceInterface.class, MyServiceImpl.class); // Make bind() calls on the binder object to define most IoC services. // Use service builder methods (example below) when the implementation // is provided inline, or requires more initialization than simply // invoking the constructor. } public static void contributeApplicationDefaults( MappedConfigurationString, String configuration) { // Contributions to ApplicationDefaults will override any contributions to // FactoryDefaults (with the same key). Here we're restricting the supported // locales to just en (English). As you add localised message catalogs and other assets, // you can extend this list of locales (it's a comma separated series of locale names; // the first locale name is the default when there's no reasonable
Re: Does message catalog retrieval look at containing component/page catalogs?
No, not containing components. It checks the component, and works up the *inheritance* of the component, then finally to the Global message catalog. On Wed, Aug 10, 2011 at 2:44 PM, robert baker les.baker1...@gmail.com wrote: Hi all, When you supply a message key, does Tapestry 5.1 scan the catalogs of containing components and/or pages? For example, if Index.tml contained component Foobar, and Foobar.tml had a TextField with a t:id=xyzzy, would Index.properties get hit for xyzzy-label after Foobar.properties gets examined? It doesn't seem to (I know it looks at base class and the app catalogs). I'm doing a one-off component and it seems clunky to have to make a new properties file just for one or two labels or error messages. I searched the mailing list and didn't seem to find anything discussing this. Thanks, Les Baker - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ANN: Tapestry-tagselect version 1.0 released
Alright, first try pushed to GitHub. Build it locally (mvn install) and change your dependency to version 1.3-SNAPSHOT and see if it does what you want now. I think I solved the problem with greater/less-than signs in the strings as well. :-) Regards, Joakim On Wed, Aug 10, 2011 at 8:21 PM, George Christman gchrist...@cardaddy.com wrote: That would be amazing if you got that working. I feel it would make for a much better UX. I'll check in with you tomorrow to see if you were able to make any progress. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686771.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reusing form from CreateSomeBean on EditSomeBean
There are a number of examples at http://jumpstart.doublenegative.com.au/jumpstart/ http://jumpstart.doublenegative.com.au/jumpstart/previews/easycrud/persons http://jumpstart.doublenegative.com.au/jumpstart/previews/totalcontrolcrud/persons regards Taha On Thu, Aug 11, 2011 at 1:19 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Wed, 10 Aug 2011 16:38:17 -0300, Eric Torti ericzu...@gmail.com wrote: Hello, guys, Hi! I`m trying to reuse the beaneditform I`ve came up with for one of my pages, whose responsibility is to CreateSomeBean. I would like to make the core form a compontent so that I could use it either on the CreateSomeBean as on the EditSomeBean page. Is there a tutorial or how to that points out how this can be accomplished? Check this: http://tapestry.apache.org/component-classes.html -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Regards Taha Hafeez Siddiqi (tawus) http://tawus.wordpress.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
IoC services - can they come from an external jar?
Hi Tapestry Users, It gives me great pleasure to have a question to ask this list after picking up some tapestry deving again. I'm playing around with a new EJB3.1 book with icedtea6 (openjdk) running on glassfishv3.1.1. Using jumpstart's BusinessServicesLocator(BSL) and bind() -ing it in AppModule.java I wondered if the BSL and it's interface can come from another jar or does it have to be in the services directory? Thanks for your time, Chris P.S. how is the tapestry 5 in action book going? i read chapter 1 about 3 or 4 months ago i think and it was an amazing explanation of a terrific framework! Thanks everyone :D