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 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).

Thanks,
Peter



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 repositories as well. 
Never liked it.. and now I am able to get rid of them :-)

Piero

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 Message-
From: Howard Lewis Ship [mailto:hls...@gmail.com] 
Sent: Tuesday, June 23, 2009 10:08 PM
To: Tapestry users
Subject: Re: recursion in PropertyConduitSource?

Try using the correct dependency: antlr-runtime-3.1.1.

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 the three Tapeestry lib files that
I
 have in my project by their 5.1 versions):

 This is the first error I get in my Eclipse console:

 java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream
   at java.lang.Class.getDeclaredConstructors0(Native Method)
   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
   at java.lang.Class.getConstructors(Class.java:1476)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils.findAutobuildConstr
uctor(InternalUtils.java:628)
   at

org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$4.invoke(ServiceR
esourcesImpl.java:150)
   at

org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationT
rackerImpl.java:68)
   at

org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerTh
readOperationTracker.java:68)
   at

org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:
941)
   at

org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.autobuild(Service
ResourcesImpl.java:145)
   at

org.apache.tapestry5.ioc.internal.services.AutobuildObjectProvider.provi
de(AutobuildObjectProvider.java:33)
   at

org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.in
voke(MasterObjectProviderImpl.java:48)
   at

org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationT
rackerImpl.java:68)
   at

org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerTh
readOperationTracker.java:68)
   at

org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:
941)
   at

org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.prov
ide(MasterObjectProviderImpl.java:41)
   at

$MasterObjectProvider_1220e25ac25.provide($MasterObjectProvider_1220e25a
c25.java)
   at

org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.ja
va:696)
   at

org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLoca
torImpl.java:49)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(
InternalUtils.java:209)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(Internal
Utils.java:43)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUt
ils.java:256)
   at

org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationT
rackerImpl.java:68)
   at

org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerTh
readOperationTracker.java:68)
   at

org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:
941)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters
(InternalUtils.java:260)
   at

org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters
ForMethod(InternalUtils.java:217)
   at

org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObje
ct(ServiceBuilderMethodInvoker.java:56)
   at

org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invok
e(OperationTrackingObjectCreator.java:45)
   at

org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationT
rackerImpl.java:68)
   at

org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerTh
readOperationTracker.java:68)
   at

org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:
941)
   at

org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createO
bject(OperationTrackingObjectCreator.java:49)
   at

org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createServic
e(SingletonServiceLifecycle.java:29)
   at

org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createO
bject(LifecycleWrappedServiceCreator.java:46)
   at

org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(Advis
orStackBuilder.java:60)
   at

org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(I
nterceptorStackBuilder.java:52)
   at

org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.c
reateObject(RecursiveServiceCreationCheckWrapper.java:60)
   at

org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invok
e(OperationTrackingObjectCreator.java:45)
   at

org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationT
rackerImpl.java:68)
   at

org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerTh

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 the three Tapeestry lib files that I
have in my project by their 5.1 versions):

This is the first error I get in my Eclipse console:

java.lang.NoClassDefFoundError: org/antlr/runtime/CharStream
  at java.lang.Class.getDeclaredConstructors0(Native Method)
  at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
  at java.lang.Class.getConstructors(Class.java:1476)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils.findAutobuildConstructor(InternalUtils.java:628)
  at
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$4.invoke(ServiceResourcesImpl.java:150)
  at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
  at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
  at
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.autobuild(ServiceResourcesImpl.java:145)
  at
org.apache.tapestry5.ioc.internal.services.AutobuildObjectProvider.provide(AutobuildObjectProvider.java:33)
  at
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl$1.invoke(MasterObjectProviderImpl.java:48)
  at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
  at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
  at
org.apache.tapestry5.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:41)
  at
$MasterObjectProvider_1220e25ac25.provide($MasterObjectProvider_1220e25ac25.java)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:696)
  at
org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:49)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:209)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:43)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:256)
  at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
  at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:260)
  at
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForMethod(InternalUtils.java:217)
  at
org.apache.tapestry5.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:56)
  at
org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
  at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
  at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
  at
org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
  at
org.apache.tapestry5.ioc.internal.SingletonServiceLifecycle.createService(SingletonServiceLifecycle.java:29)
  at
org.apache.tapestry5.ioc.internal.LifecycleWrappedServiceCreator.createObject(LifecycleWrappedServiceCreator.java:46)
  at
org.apache.tapestry5.ioc.internal.AdvisorStackBuilder.createObject(AdvisorStackBuilder.java:60)
  at
org.apache.tapestry5.ioc.internal.InterceptorStackBuilder.createObject(InterceptorStackBuilder.java:52)
  at
org.apache.tapestry5.ioc.internal.RecursiveServiceCreationCheckWrapper.createObject(RecursiveServiceCreationCheckWrapper.java:60)
  at
org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator$1.invoke(OperationTrackingObjectCreator.java:45)
  at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:68)
  at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
  at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:941)
  at
org.apache.tapestry5.ioc.internal.OperationTrackingObjectCreator.createObject(OperationTrackingObjectCreator.java:49)
  at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.obtainObjectFromCreator(JustInTimeObjectCreator.java:68)
  at
org.apache.tapestry5.ioc.internal.services.JustInTimeObjectCreator.createObject(JustInTimeObjectCreator.java:57)
  at

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.


Currently the users of the application have to fill out all fields (so that the 
form validates and the values of the components are written in my business 
object) before they can go to a sub-page.




Thiago H. de Paula Figueiredo schrieb:
Why don't you use @SessionState in the complex object you're editing? 
When done, persist it to the database and then clear the object in 
@SessionState.




--
Felix Gonschorek
GG-Media

Kirchstr. 18
69115 Heidelberg

Tel:  +49 6221 187 18 10
Fax:  +49 6221 187 18 99
Mobil: +49 176 2234 1338

fe...@gg-media.biz
http://www.gg-media.biz

Vertretungsberechtigte Gesellschafter:
Felix Gonschorek  Jochen Greiner

Umsatzsteuer-Identifikationsnummer
gemäß § 27a Umsatzsteuergesetz:
DE232906440

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 
 DOM, which is a particularly useful thing to do in tests of components and 
 pages. 
 
   
 ** For non-Maven people:
 http://tapestry.formos.com/maven-repository/com/formos/tapestry/tapestry-xpa
 th/1.0.0/
 
 
 ** For Maven people:
 
 repository
   idtapestry/id
   urlhttp://tapestry.formos.com/maven-repository/url
 /repository
 
 dependency
   groupIdcom.formos.tapestry/groupId
   artifactIdtapestry-xpath/artifactId
   version1.0.0/version
 /dependency
 
 
 - Paul
 
 ---
 Paul Field
 http://creakingcogs.blogspot.com/
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://n2.nabble.com/-Announce--Tapestry-XPath-project---v1.0.0-released-tp3082258p3148390.html
Sent from the Tapestry Users 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: 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 (response instanceof HttpServletResponse) {

((HttpServletResponse)response).setHeader(X-UA-Compatible,
IE=EmulateIE7);
}  
chain.doFilter(request, response);
}
...
-- 
View this message in context: 
http://www.nabble.com/IE8-Compatibility-Quick-Fix-tp19340728p24183949.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



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 the moment I see my components more as value providers for my (H)TML 
view logic and have all calls to backend services in the pages. But what 
do others do and think?


Regards, Kai

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 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 the moment I see my components more as value providers for my (H)TML 
 view logic and have all calls to backend services in the pages. But what 
 do others do and think?
 
 Regards, Kai
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Architecture%3A-how-much-logic-should-a-component-contain-tp24183982p24184068.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: 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 you like to the head.

(This is how @IncludeStyleSheet works).


Ben Gidley

www.gidley.co.uk
b...@gidley.co.uk


On Thu, Oct 30, 2008 at 9:47 PM, samlai syc...@gmail.com wrote:


 I'm guessing it's not currently doable with Tapestry 5.  I bet this
 particular request will grow in popularity when IE8 is officially released.
 The easiest way to port existing web pages for IE8 is that one liner at the
 top.


 Peter Stavrinides wrote:
 
  There has been a lot of posts on this topic, and yes you are not alone.
 
  --
  If you are not an intended recipient of this e-mail, please notify the
  sender, delete it and do not read, act upon, print, disclose, copy,
 retain
  or redistribute it. Please visit http://www.albourne.com/email.html for
  important additional terms relating to this e-mail.
 
  - Original Message -
  From: Luther Baker lutherba...@gmail.com
  To: Tapestry users users@tapestry.apache.org
  Sent: Thursday, 23 October, 2008 2:53:30 AM GMT +02:00 Athens, Beirut,
  Bucharest, Istanbul
  Subject: Re: IE8 Compatibility Quick Fix
 
  I'm afraid this will be an unpopular suggestion - but does anyone else
  wish
  there was a little simpler, manual/direct control over the head section
  of
  the page?
 
  Just my $0.02.
 
  -Luther
 
 
 
  On Wed, Oct 22, 2008 at 5:12 PM, samlai syc...@gmail.com wrote:
 
 
  Anybody knows how to do this?
 
  BTW, the css include tag right after head is the following:
 
  head
 link href=assets/tapestry/5.0.13/default.css rel=stylesheet
  type=text/css
 
  Basically I want to be able to do the following:
 
  head
 meta http-equiv=X-UA-Compatible content=IE=EmulateIE7 /
  link href=assets/tapestry/5.0.13/default.css rel=stylesheet
  type=text/css
  --
  View this message in context:
 
 http://www.nabble.com/IE8-Compatibility-Quick-Fix-tp19340728p20120755.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
 
 
 

 --
 View this message in context:
 http://www.nabble.com/IE8-Compatibility-Quick-Fix-tp19340728p20255158.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: 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 extract them to libraries after a few iterations. I try to make components 
self describing (in other words they can be understood and documented via their 
parameters), although I find this is not always possible.  

and have all calls to backend services in the pages
Well no, I see my pages as simply containers for components, so they should 
contain as little logic as possible. I tend to use IoC a *lot creating many 
small services, as I find they are highly testable and reusable. Having queries 
in pages can introduce duplication as many pages can required the same / 
similar beans. Building on top of Tapestry is also so easy because Tapestry 
does nearly all of the the wiring of dependencies, which is a huge productivity 
boost. 

I also try to use a single DOA per page, although there are times when this is 
just not possible. lastly, I like to refactor often, I find its the best way to 
evolve code into something more decent / reliable and reusable.

Peter 


- Original Message -
From: Kai Weber kai.we...@glorybox.de
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, 24 June, 2009 15:34:44 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Architecture: how much logic should a component contain

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 the moment I see my components more as value providers for my (H)TML 
view logic and have all calls to backend services in the pages. But what 
do others do and think?

Regards, Kai

-
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: 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 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.

It depends on how self-contained the component is. If it is used to
show some information that is page-independent, it retrieves this
information from the service directly. One example would be a tag
cloud component in a blog package. The component parameters would be
used to fine-tune the component rendering (maximum number of tags, for
example).

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 that actually stores the data?
Or break the form in n forms, each one in a different page?

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 properties reloading and it works like a charm. :)

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runAfters(BeforeAndAfterRunner.java:65)
at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:37)
at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at 
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at 
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

I get this regardless of what I try, its being caused by:
private static final TapestryTester SHARED_TESTER = new TapestryTester(demo, 
MyCoreModule.class);

... I am not sure exactly what this relates to, especially without source. Any 
suggestions?

Cheers,
Peter

- Original Message -
From: Paul Field paul.fi...@db.com
To: Tapestry users users@tapestry.apache.org
Sent: Monday, 22 June, 2009 12:07:02 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: [Announce] Tapestry Testify project

p.stavrini...@albourne.com wrote on 19/06/2009 17:00:14:

 could there be a naming problem in 
 the constructor, shouldn't it read:
 
 public abstract class AbstractMyApplicationTest extends TapestryTest {
.
 public *AbstractMyApplicationTest()* {  //and not TestifyTest() ?
 super(SHARED_TESTER);
 }
...


Hi Peter,

Doh! Yes - I renamed the classes in the documentation and forgot to rename 
the constructors... thanks for pointing that out.

I'll fix the documentation when I'm at home - it will be in the next 
nightly build.

Paul

--
Paul Field
Research IT
Deutsche Bank



---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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: Wednesday, 24 June, 2009 17:19:21 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to add new entries to the global message catalog

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 properties reloading and it works like a charm. :)

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 components,
pages and mixins are not live reloaded, unless you change some class
in the same package (trick given by Howard some time ago).

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 users@tapestry.apache.org
Sent: Wednesday, 24 June, 2009 17:43:32 GMT +02:00 Athens, Beirut, Bucharest, 
Istanbul
Subject: Re: How to add new entries to the global message catalog

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 components,
pages and mixins are not live reloaded, unless you change some class
in the same package (trick given by Howard some time ago).

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 itself, then there would be no need to call
getAvailableRows() before prepare(), which is a problem (at least IMHO).
Then Grid#setupDataSource() could look like this:

void setupDataSource()
{
cachingSource = new CachingDataSource(source);
int startIndex = (getCurrentPage()-1) * rowsPerPage;
cachingSource.prepare(startIndex, startIndex+rowsPerPage,
sortModel.getSortConstraints());
}

This would allow for single-call (those which receive number of
available rows, columns definitions, and columns values in one expensive
call) datasources to work.

Best regards,
Przemysław Wojnowski


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 save it. I'm not using any other
source for the global message catalog besides app*.properties.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 and limit = endIndex - startIndex + 1, I think
their interchangeable for most scenarios.

 I'm asking, because if GridDataSource could calculate endIndex (or use
 limit instead) for itself, then there would be no need to call
 getAvailableRows() before prepare(), which is a problem (at least IMHO).

I guess getAvailableRows() is used for calculating the number of pages
and then display the pager.

 This would allow for single-call (those which receive number of
 available rows, columns definitions, and columns values in one expensive
 call) datasources to work.

Please file a JIRA about this. Maybe we could use some special return
value in GridDataSource.getAvailableRows() to indicate that it is not
available yet and then call it again after GridDataSource.prepare(),
thus solving your problem.

-- 
Thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 to make/use maven to resolve such dependency problems?


I don't follow you.  Using Maven you would never have had such a problem.

-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos


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 how then do you add (*not update) and remove 
entries from the global message catalog?


I just edit the properties file and save it. I'm not using any other
source for the global message catalog besides app*.properties.



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 pick them up manually from:
http://tapestry.formos.com/maven-snapshot-repository/com/formos/tapestry/tapestry-testify/1.0.0-SNAPSHOT/

Or just ask Maven to download them for you: 
mvn [goal] -DdownloadSources=true 

(The m2eclipse plugin for eclipse can download them and bind them to the 
jar for you, which makes life very pleasant).


Next, I think my documentation is misleading you... try:

private static final TapestryTester SHARED_TESTER = new 
TapestryTester(demo);


The documentation's example with MyCoreModule.class is meant to show you 
how to include your own core IOC module 
(see: 
http://tapestry.formos.com/nightly/tapestry-testify/#Integration_testing 
).

Alternatively, you might need to include your AppModule as the parameter - 
if you do then read the link above about integration testing
and break up your AppModule.

Let me know how you get on!

Paul

--
Paul Field
Research IT
Deutsche Bank




---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

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 convienient and then
refactor (mercilessly!) later.

On Wed, Jun 24, 2009 at 5:34 AM, Kai Weber kai.we...@glorybox.de wrote:

 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 the moment I see my components more as value providers for my (H)TML
 view logic and have all calls to backend services in the pages. But what do
 others do and think?

 Regards, Kai

 -
 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
Director of Open Source Technology at Formos


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
organizations to replicate their  joint marketing efforts on the internet.
corp blog : http://amplafi.com/blog
personal blog : http://www.sworddance.com/blog


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? Are there any potential issues using static attributes
instead?

Kalle

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 t:id=button value=search event=clicked /

gentoo.java :

@Component(parameters = {type=button})
private Button button;

@OnEvent(component = button, value = clicked)
public JSONObject onButtonClicked(String value) {

System.out.println(Event Caught !);
}

Thanks




-- 
View this message in context: 
http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24192270.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: 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 service is
going to be a better option.

On Wed, Jun 24, 2009 at 12:36 PM, Kalle Korhonen kalle.o.korho...@gmail.com
 wrote:

 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? Are there any potential issues using static attributes
 instead?

 Kalle

 -
 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
Director of Open Source Technology at Formos


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 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 t:id=button value=search event=clicked /

 gentoo.java :

 @Component(parameters = {type=button})
private Button button;

@OnEvent(component = button, value = clicked)
public JSONObject onButtonClicked(String value) {

System.out.println(Event Caught !);
}

 Thanks




 --
 View this message in context:
 http://www.nabble.com/Tapestry-5-and-Event-component.-tp24192270p24192270.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




-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos


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 services in generic  
abstract pages (Tapestry CRUD' BaseEditPage, for example). In  
BaseEditPage, I need a Controller instance, but it is specific to the  
entity class being edited, and there's one BaseEditPage subclass for each  
entity class. Instead of using my ControllerSource service everytime I  
need a Controller, I @Retain the Controller instance, setting it in  
BaseEditPage's constructor.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 that makes two 
instances of MyPage in the pool. When a page is requested Tapestry looks in the 
page pool, if that page is readily available. If none is immediately available, 
it creates one. This is done up to an amount of pages that is configured with 
tapestry.page-pool.soft-limit. If that number is reached for a particular 
page (combination of page and locale) it will wait for an amount of time that 
can be configured with tapestry.page-pool.soft-wait If no page becomes 
available within that time, Tapestry will create a new instance. This is done 
until an absolute maximum of pages (all pages together) is reached. This 
absolute maximum is configured with tapestry.page-pool.hard-limit. If that is 
reached, request will fail. Pages that are in the pool and are not used for an 
amount of time, will be deleted from the pool. This can be configured with 
tapestry.page-pool.active-window. Look here for details: 
http://tapestry.apache.org/tapestry5.1/guide/conf.html

 Are there any potential issues using static attributes instead?
If the attribute can be calculated already at class-loading time, there is no 
issue. Except if calculating that attribute is time consuming or may fail. That 
would slow down or even block loading of the page class.

Regards, nillehammer

==


- original Nachricht 

Betreff: Difference between @Retain and static attributes?
Gesendet: Mi, 24. Jun 2009
Von: Kalle Korhonenkalle.o.korho...@gmail.com

 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? Are there any potential issues using static attributes
 instead?
 
 Kalle
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 

--- original Nachricht Ende 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 Tapestry?


I implemented something very similar, but with Hibernate Validator, so it  
must be easy, as JSR 303 looks like Hibernate Validator standerdized and  
more powerful :). It is in an unreleased version of Tapestry  
CRUD-Hibernate Validator  
(http://www.arsmachina.com.br/project/tapestrycrudhibernatevalidator, you  
can find sources there) It has two parts: some classes that implement  
ValidationConstraintGenerator, automatically adding the required  
validation for properties annotated with @NotNull, for example, and a  
mixin, HibernateValidatorMixin, that executes all the validations again,  
including the ones defined by @AssertTrue and @AssertFalse, in  
BaseEditPage (from Tapestry CRUD) subclasses.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



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 at 2:33 PM, nille
hammertapestry.nilleham...@winfonet.eu wrote:
 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 that makes two 
 instances of MyPage in the pool. When a page is requested Tapestry looks in 
 the page pool, if that page is readily available. If none is immediately 
 available, it creates one. This is done up to an amount of pages that is 
 configured with tapestry.page-pool.soft-limit. If that number is reached 
 for a particular page (combination of page and locale) it will wait for an 
 amount of time that can be configured with tapestry.page-pool.soft-wait If 
 no page becomes available within that time, Tapestry will create a new 
 instance. This is done until an absolute maximum of pages (all pages 
 together) is reached. This absolute maximum is configured with 
 tapestry.page-pool.hard-limit. If that is reached, request will fail. Pages 
 that are in the pool and are not used for an amount of time, will be deleted 
 from the pool. This can be configured with 
 tapestry.page-pool.active-window. Look here for details: 
 http://tapestry.apache.org/tapestry5.1/guide/conf.html

 Are there any potential issues using static attributes instead?
 If the attribute can be calculated already at class-loading time, there is no 
 issue. Except if calculating that attribute is time consuming or may fail. 
 That would slow down or even block loading of the page class.

 Regards, nillehammer

 ==


 - original Nachricht 

 Betreff: Difference between @Retain and static attributes?
 Gesendet: Mi, 24. Jun 2009
 Von: Kalle Korhonenkalle.o.korho...@gmail.com

 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? Are there any potential issues using static attributes
 instead?

 Kalle

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



 --- original Nachricht Ende 


 -
 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