How to add new entries to the global message catalog

2009-06-24 Thread P . Stavrinides
Hi, Is it possible to add and remove entries from the global message catalog? I thought of extending AbstractMessages with my own implementation since I couldn't find a way, but even if I do this how do I get Tapestry to detect / reconstruct the relevant properties map in the registry? PS: If

Re: [T5.1] @SessionState an generic pages

2009-06-24 Thread Piero Sartini
protected ClassT getValueClass() { return (ClassT) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]; } I use something similar in DAOs, idea came from here: https://www.hibernate.org/328.html Thanks!! Had an abstract getEntityClass() method for my

RE: recursion in PropertyConduitSource?

2009-06-24 Thread Alexey Chmutov
Thanks, Howard I was looking for an info how to fix this recursion in PropertyConduitSource error since the beginning of May. It emerged that just version switch from 2.7.6 to 3.1.1 was needed. Is there any way to make/use maven to resolve such dependency problems? Alexey. -Original

Re: recursion in PropertyConduitSource?

2009-06-24 Thread Christine
Howard Lewis Ship wrote: Try using the correct dependency: antlr-runtime-3.1.1. thanks, that works. On Tue, Jun 23, 2009 at 10:35 AM, Christine christ...@christine.nl wrote: replying to an old reply, about an error I get when upgrading to Tapestry 5.1 (upgrade consisted of replacing

Re: [5.1.0.5] Saving form state for later re-population of field values

2009-06-24 Thread Felix Gonschorek
I use this pattern (SessionState cleared after successful processing), but: The form values get not set in my object, because the form has not been filled out completely. I want to save the (unvalidated) state of the form, to repopulate the component values at a later point in time.

Re: [Announce] Tapestry XPath project - v1.0.0 released

2009-06-24 Thread ice
Testify+XPath sounds great! Thanks a lot :) Paul Field-2 wrote: I'd like to announce the first stable release of the Tapestry-XPath project at Tapestry360: https://tapestry.formos.com/projects/tapestry-xpath/ Tapestry XPath allows you to use XPath expressions to query the Tapestry

Re: IE8 Compatibility Quick Fix

2009-06-24 Thread Valentin Yerastov
Hello, I use for this servlet filter. public class IE8CompatibleFilter implements Filter { @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { if

Architecture: how much logic should a component contain

2009-06-24 Thread Kai Weber
Hi, what do you think, how much of logic a component should contain? Say I have a service which retrieves values from somewhere. Should I make this service available in the component or the page containing the component and setting the values via a @Parameter variable in the component. At

Re: Architecture: how much logic should a component contain

2009-06-24 Thread Angelo Chen
I'd prefer to put as many logic as possible in the service, component should be like page, for the view tier only, it is easy to test service. Kai Weber-2 wrote: Hi, what do you think, how much of logic a component should contain? Say I have a service which retrieves values from

Re: IE8 Compatibility Quick Fix

2009-06-24 Thread Ben Gidley
You should be able to do this with a MarkupRendererFilter If you write one and contribute it to public void contributeMarkupRenderer(OrderedConfigurationMarkupRendererFilter configuration){ ... } It will give you access to the write object before/after the render. That will let you add anything

Re: Architecture: how much logic should a component contain

2009-06-24 Thread P . Stavrinides
Of course these are all matters of opinion, but this is my view: what do you think, how much of logic a component should contain? Business logic should not reside in components at all. I like my components to be as modular as possible (can be reused in many places without change), I tend to

Re: Architecture: how much logic should a component contain

2009-06-24 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 9:34 AM, Kai Weberkai.we...@glorybox.de wrote: Hi, Hi! what do you think, how much of logic a component should contain? I completely agree with Peter that no business or data access logic nor should be in components or pages. Say I have a service which retrieves

Re: [5.1.0.5] Saving form state for later re-population of field values

2009-06-24 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 8:35 AM, Felix Gonschorekfe...@gg-media.biz wrote: I use this pattern (SessionState cleared after successful processing), but: The form values get not set in my object, because the form has not been filled out completely. Why don't you defer the validation to the page

Re: How to add new entries to the global message catalog

2009-06-24 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 3:47 AM, p.stavrini...@albourne.com wrote: Hi, Hi! PS: If u think this is a bad idea, then pls offer an alternative suggestion, all I really need is property changes that get picked up at runtime (including new writes and deletes). Tapestry already does live

Re: [Announce] Tapestry Testify project

2009-06-24 Thread P . Stavrinides
Hi Paul, I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: java.lang.NoClassDefFoundError: Could not initialize class com.albourne.web.testinfrastructure.TestMailService at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at

Re: How to add new entries to the global message catalog

2009-06-24 Thread Peter Stavrinides
Tapestry already does live properties reloading and it works like a charm. :) So far as I know only to existing properties in the message catalog, right? - Original Message - From: Thiago H. de Paula Figueiredo thiag...@gmail.com To: Tapestry users users@tapestry.apache.org Sent:

Re: How to add new entries to the global message catalog

2009-06-24 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 11:36 AM, Peter Stavrinidesp.stavrini...@albourne.com wrote: Tapestry already does live properties reloading and it works like a charm. :) So far as I know only to existing properties in the message catalog, right? Not right. :) The whole properties file is reloaded. New

Re: How to add new entries to the global message catalog

2009-06-24 Thread Peter Stavrinides
Not right. :) The whole properties file is reloaded. Good, glad to be wrong :), so how then do you add (*not update) and remove entries from the global message catalog? - Original Message - From: Thiago H. de Paula Figueiredo thiag...@gmail.com To: Tapestry users

T5: Grid#setupDataSource and GridDataSource

2009-06-24 Thread Przemysław Wojnowski
Hi! Why Grid#setupDataSource() is calculating endIndex and not allowing for GridDataSource to do it? Why GridDataSource#prepare method have startIndex and endIndex parameters and not offset/limit pair? I'm asking, because if GridDataSource could calculate endIndex (or use limit instead) for

Re: How to add new entries to the global message catalog

2009-06-24 Thread Thiago H. de Paula Figueiredo
On Wed, Jun 24, 2009 at 11:53 AM, Peter Stavrinidesp.stavrini...@albourne.com wrote: Not right. :) The whole properties file is reloaded. Good, glad to be wrong :), so how then do you add (*not update) and remove entries from the global message catalog? I just edit the properties file and

Re: T5: Grid#setupDataSource and GridDataSource

2009-06-24 Thread Thiago H. de Paula Figueiredo
2009/6/24 Przemysław Wojnowski przemyslaw.wojnow...@nask.pl: Hi! Hi! Why Grid#setupDataSource() is calculating endIndex and not allowing for GridDataSource to do it? Why GridDataSource#prepare method have startIndex and endIndex parameters and not offset/limit pair? As offset = startIndex

Re: recursion in PropertyConduitSource?

2009-06-24 Thread Howard Lewis Ship
On Wed, Jun 24, 2009 at 3:34 AM, Alexey Chmutov achmu...@swiftteams.comwrote: Thanks, Howard I was looking for an info how to fix this recursion in PropertyConduitSource error since the beginning of May. It emerged that just version switch from 2.7.6 to 3.1.1 was needed. Is there any way

Re: How to add new entries to the global message catalog

2009-06-24 Thread Ulrich Stärk
I think Peter wants to edit the message catalog programmatically. On 24.06.2009 17:07 schrieb Thiago H. de Paula Figueiredo: On Wed, Jun 24, 2009 at 11:53 AM, Peter Stavrinidesp.stavrini...@albourne.com wrote: Not right. :) The whole properties file is reloaded. Good, glad to be wrong :), so

Re: [Announce] Tapestry Testify project

2009-06-24 Thread Paul Field
p.stavrini...@albourne.com wrote on 24/06/2009 15:35:00: I seem to be too stupid to get testify working with JUnit 4, I can't get even past the gate: I prefer to see it as a failure of my documentation :-) First thing, the Testify sources are published to the Maven repository, so you can

Re: Architecture: how much logic should a component contain

2009-06-24 Thread Howard Lewis Ship
I think you are on the right track ... however, when doing demos and tutorials I often have a bit of business logic (i.e., Hibernate queries) in my pages, where I can live-reload them. One of my labs is to refactor that into a shared service. My point is, don't over-engineer early on, do what is

Tapestry 5 and JSR-303 plans?

2009-06-24 Thread Patrick Moore
Hi there -- I just found out about JSR-303 ( bean validation JSR ). It may be too soon to ask. but any plans on implementing this JSR inside of Tapestry? Patrick Moore Amplafi http://amplafi.com 650-207-9792 Amplafi enables businesses, professional organizations, bands, and other

Difference between @Retain and static attributes?

2009-06-24 Thread Kalle Korhonen
I was using @Retain for some fields that only needed to be initialized once on a page. However, I see that they are reset after some time has passed. How does the page pool work - are less used pages removed from the pool only when other pages push them out or is the cache cleared periodically?

matriz

2009-06-24 Thread Gutemberg Albuquerque Da Silva
anybody knows some solution for working editable matriz? I need to catch cell of table. thanks. -- Gutemberg Albuquerque Da Silva

Tapestry 5 and Event component.

2009-06-24 Thread b...@umd
I am getting this error when clicking on my searchbutton. What is my problem exactly ? Request event 'clicked' (on component Gentoo:button) was not handled; you must provide a matching event handler method in the component or in one of its containers. gentoo.tml : t:button type=button

Re: Difference between @Retain and static attributes?

2009-06-24 Thread Howard Lewis Ship
@Retain are per-instance which can be much different than a static. @Retain looked like a good idea at the time, but I have never used it in a project. Chances are, if you have some global state that needs to be shared between users, neither @Retain or a static field is correct ... a shared

Re: Tapestry 5 and Event component.

2009-06-24 Thread Howard Lewis Ship
I suspect Tapestry got confused because your method is both the naming convention (onButtonClicked) and has @OnEvent ... and they are in conflict. Rename the method to not start with on. On Wed, Jun 24, 2009 at 1:26 PM, b...@umd bben...@umd.edu wrote: I am getting this error when clicking on

Re: Difference between @Retain and static attributes?

2009-06-24 Thread Thiago H. de Paula Figueiredo
Em Wed, 24 Jun 2009 18:11:28 -0300, Howard Lewis Ship hls...@gmail.com escreveu: @Retain are per-instance which can be much different than a static. @Retain looked like a good idea at the time, but I have never used it in a project. I use it to cache some class-specific values got from

Re: matriz

2009-06-24 Thread Thiago H. de Paula Figueiredo
Em Wed, 24 Jun 2009 16:48:17 -0300, Gutemberg Albuquerque Da Silva sag@gmail.com escreveu: anybody knows some solution for working editable matriz? I need to catch cell of table. Take a look at Tapestry's Grid and ChenilleKit's InPlaceEdito. -- Thiago H. de Paula Figueiredo Independent

Re: Difference between @Retain and static attributes?

2009-06-24 Thread nille hammer
Hi Kalle, How does the page pool work - are less used pages removed from the pool only when other pages push them out or is the cache cleared periodically? Page pooling is done separately for each page (and localization of the page). I.e. If you have a Page MyPage for locale de and for en

Re: Tapestry 5 and JSR-303 plans?

2009-06-24 Thread Thiago H. de Paula Figueiredo
Em Wed, 24 Jun 2009 15:17:56 -0300, Patrick Moore patmo...@amplafi.com escreveu: Hi there -- Hi! I just found out about JSR-303 ( bean validation JSR ). It may be too soon to ask. A little bit, as it was not approved tyet.. but any plans on implementing this JSR inside of

Re: Difference between @Retain and static attributes?

2009-06-24 Thread Kalle Korhonen
Excellent, thanks for all the answers, it confirmed my assumptions on how things work. Meanwhile I had refactored the page logic to use a shared service, exactly what Howard was suggesting. I can see why @Retain looks like a good idea but rarely gets used in practice. Kalle On Wed, Jun 24, 2009