T5:can we nest a bean's property value in message resource?

2009-09-17 Thread cleverpig
hi,all! thank everyone for help me! i get a new problem~can we nest a bean property value in ${message:}? for example: A class's property: foo(string type),it's value: "start". can i use this foo's value in this way: ${message:prop:foo} or ${message: ${prop:foo} } i mean it should equal with ${m

Re: T5:can we nest a bean's property value in message resource?

2009-09-17 Thread DH
Currently no such solution, but you can create new binding prefix for your requirement. But maybe a bit complicated. Another simpler way is using Messages#get in your page class. DH http://www.gaonline.com.cn - Original Message - From: "cleverpig" To: "Tapestry users" Sent: Thursday,

StreamResponse on Success

2009-09-17 Thread jose luis sanchez
Hi all. I've found myself a problem in an application i've developed using T5.1 There's a page, with 2 datefields, ( From / To ), and a Submit. The Submit button calls the StreamResponse onSuccess() method , returning a CVS file with a list of records. But i'd like to show a label with the

Re: T5:can we nest a bean's property value in message resource?

2009-09-17 Thread cleverpig
oh,thank! I constructed the message resource to get this target: public class PageDes { private String page; private String displayName; ... } public class Layout{ public List getPages(){ List pages=new ArrayList(); pages.add(new PageDes("s

StreamResponse on Success

2009-09-17 Thread jose luis sanchez
( Sorry, got wrong thread ) :-( Hi all. I've found myself a problem in an application i've developed using T5.1 There's a page, with 2 datefields, ( From / To ), and a Submit. The Submit button calls the StreamResponse onSuccess() method , returning a CVS file with a list of records. But

T5:how to expand Grid for add some query textfield?

2009-09-17 Thread cleverpig
in this situation,we have a grid page for products. our client need add some textfeild or selectbox on the bottom of grid,and then he can input query condition such as name/price/... how to expand Grid with them? i think this is a real familiar problem when we developed web app. i did that in a s

Re: T5:how to expand Grid for add some query textfield?

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 06:09:04 -0300, cleverpig escreveu: in this situation,we have a grid page for products. our client need add some textfeild or selectbox on the bottom of grid,and then he can input query condition such as name/price/... how to expand Grid with them? Just create a Form af

Re: How to create analog of Spring FactoryBean?

2009-09-17 Thread Paul Field
> Peter Niederwieser > I'd be interested to see a ServiceLifecycle implementation for prototype > scope. Kristian Marinkovic wrote on 16/09/2009 11:39:16: > it is doable > > create a - let's say - a factory service with a Bean getBean() method. > then create a service for the Bean inter

Re: T5:how to expand Grid for add some query textfield?

2009-09-17 Thread cleverpig
On Thu, Sep 17, 2009 at 8:00 PM, Thiago H. de Paula Figueiredo wrote: > Em Thu, 17 Sep 2009 06:09:04 -0300, cleverpig > escreveu: > >> in this situation,we have a grid page for products. >> our client need add some textfeild or selectbox on the bottom of >> grid,and then he can input query condit

Re: T5:how to expand Grid for add some query textfield?

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 09:24:05 -0300, cleverpig escreveu: oh,thanks! it's seem like my way. but how to handler this form submit event and grid event independently? Please read the documentation. Grid doesn't trigger any events. -- Thiago H. de Paula Figueiredo Independent Java consultant, de

Palette and selection filtering

2009-09-17 Thread rolfst
Hi Iam trying to filter out the already selected entries from the available entries from a palette. but my page comes up with a nullpointerexception. When i do keep everything in the available selection list everything works fine. is there a way to resolve this? Thanks -- View this message in c

Re: Palette and selection filtering

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 09:42:52 -0300, rolfst escreveu: Hi Hi! Iam trying to filter out the already selected entries from the available entries from a palette. Palette does that by itself. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.ars

Re: [Announce] ioko-tapestry-commons-1.4.0

2009-09-17 Thread Olle Hallin
Hi! I just made an attempt to introduce the Ioko tapestry-caching library in our project, but stumbled on the fact that we already use EhCache. (We use tapestry-cache 1.5.0) (Manifested as an exception from ContentCacheImpl. when it tries to create the CacheManager instance.) I then tried to bui

Re: [Announce] ioko-tapestry-commons-1.4.0

2009-09-17 Thread Ulrich Stärk
http://tapestry.apache.org/tapestry5/tapestry-ioc/cookbook/override.html On 17.09.2009 15:15 schrieb Olle Hallin: Hi! I just made an attempt to introduce the Ioko tapestry-caching library in our project, but stumbled on the fact that we already use EhCache. (We use tapestry-cache 1.5.0) (Manif

multiple onActivate methods in page handler

2009-09-17 Thread Ilya Obshadko
I have a situation here: one application page can be rendered using either one or two parameters in context. What I was expecting is calling onActivate with signature that exactly matches the number of context parameters. Instead, framework calls all onActivate methods. I've already found relevant

Re: [Announce] ioko-tapestry-commons-1.4.0

2009-09-17 Thread Olle Hallin
Gee, super! Thanx, Olle 2009/9/17 Ulrich Stärk > http://tapestry.apache.org/tapestry5/tapestry-ioc/cookbook/override.html > > On 17.09.2009 15:15 schrieb Olle Hallin: > > Hi! >> >> I just made an attempt to introduce the Ioko tapestry-caching library in >> our >> project, but stumbled on the

Using locale from user setting after login

2009-09-17 Thread Stephan Windmüller
Hello! Our application allows the user to his preferred language permanently. The value is stored in the user database and retrieved when the user logs in. But I am unsure about how to set the locale correctly after login. Currently it is set with PersistentLocale.set in the layout component whic

Re: T5:how to expand Grid for add some query textfield?

2009-09-17 Thread cleverpig
On Thu, Sep 17, 2009 at 8:39 PM, Thiago H. de Paula Figueiredo wrote: > Em Thu, 17 Sep 2009 09:24:05 -0300, cleverpig > escreveu: > >> oh,thanks! >> it's seem like my way. >> but how to handler this form submit event and grid event independently? > > Please read the documentation. Grid doesn't tr

Re: [Announce] ioko-tapestry-commons-1.4.0

2009-09-17 Thread Ben Gidley
Hi, Is the error your getting complaining about 2 ehcaches? We have this in one of our apps and it all works fine - so I am puzzled you are getting this error. Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Thu, Sep 17, 2009 at 2:15 PM, Olle Hallin wrote: > Hi! > > I just made an attempt to

Re: switch between tml and component

2009-09-17 Thread Alfonso Quiroga
Yes, I have eclipse configured so tml files are shown as JSP files, and I use a specific tapestry DTD for auto-completion, that works perfect. I was wondering a fast change between a component (or page) tml and java file, the loom project I think is very early by now, it has bugs and I couldn't ach

Re: Using locale from user setting after login

2009-09-17 Thread Ulrich Stärk
Already set it in the login logic. The following redirect should then be in the new locale. Uli On 17.09.2009 15:54 schrieb Stephan Windmüller: Hello! Our application allows the user to his preferred language permanently. The value is stored in the user database and retrieved when the user lo

Re: switch between tml and component

2009-09-17 Thread cleverpig
you're welcome! On Thu, Sep 17, 2009 at 10:15 PM, Alfonso Quiroga wrote: > Yes, I have eclipse configured so tml files are shown as JSP files, > and I use a specific tapestry DTD for auto-completion, that works > perfect. I was wondering a fast change between a component (or page) > tml and java

Re: multiple onActivate methods in page handler

2009-09-17 Thread ningdh
Return true in the onActivate handler that will prevent multiple call. DH http://www.gaonline.com.cn - Original Message - From: "Ilya Obshadko" To: Sent: Thursday, September 17, 2009 9:42 PM Subject: multiple onActivate methods in page handler >I have a situation here: one application

Re: Using locale from user setting after login

2009-09-17 Thread Stephan Windmüller
Ulrich Stärk wrote: >> But I am unsure about how to set the locale correctly after login. >> Currently it is set with PersistentLocale.set in the layout component >> which is used for every page, concretely in the SetupRender-method. >> This does not work for the first page after login. > Already

Re: StreamResponse on Success

2009-09-17 Thread jose luis sanchez
Anyone on this, please ? Hi all. I've found myself a problem in an application i've developed using T5.1 There's a page, with 2 datefields, ( From / To ), and a Submit. The Submit button calls the StreamResponse onSuccess() method , returning a CVS file with a list of records. But i'd l

Re: multiple onActivate methods in page handler

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 10:42:25 -0300, Ilya Obshadko escreveu: I guess that calling only one onActivate (the one with method parameters count exactly matching context parameters count) would be much more consistent. This already exists in Tapestry: onActivate(EventContext context). It will

Re: Using locale from user setting after login

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 11:43:54 -0300, Stephan Windmüller escreveu: We are using form based login from the application server (tomcat). So we are unable to modify the login logic. :-/ Use a RequestFilter for setting the locale. -- Thiago H. de Paula Figueiredo Independent Java consultant, dev

Re: StreamResponse on Success

2009-09-17 Thread Stefan
Hi, i think that it's not possible. Either you return a block for a zone update or the whole page or, in your case return a streamresponse. I would insert a second submit or actionlink called "Calculate results" which count the possible results and update the label. Am 17.09.2009 um 16:55

Re: StreamResponse on Success

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 11:55:03 -0300, jose luis sanchez escreveu: Anyone on this, please ? Tapestry doesn't do a redirect-after-post when you return a StreamResponse. HTTP doesn't allow to return two different responses at the same time (CSV and HTML, in your case). One possible solution

Re: [Tapestry Central] Tapestry Performance Benchmark (vs. Wicket, JSF, etc.)

2009-09-17 Thread Michael Gentry
This is the link? http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/ On Wed, Sep 16, 2009 at 4:07 PM, Howard wrote: > Peter Thomas has created a detailed performance analysis of Wicket, > Tapestry, Grails and Seam. It's an interesting read from non-Tapestry > user

Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-17 Thread Dave Greggory
Thanks for the response, Stefan. A simple BeanEditForm unfortunately won't suffice for me as indicated in my previous posts, I'm doing something a little more tricky. But thanks anyhow. Using a ComponentSource to retrieve the components I need seems to be solving the problem. I re-ran the same

Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 15:28:36 -0300, Dave Greggory escreveu: So nobody has still answered my question whether ComponentSource is an acceptable way to retrieve a component instance you need? The interface is not internal, so I'd assume so, but the implementation is, and is it reasonable to

Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-17 Thread Howard Lewis Ship
If the interface is NOT in an internal package, than its public API. Despite my best efforts, there's a lot of that! :-) On Thu, Sep 17, 2009 at 11:48 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > Em Thu, 17 Sep 2009 15:28:36 -0300, Dave Greggory > escreveu: > > So nobody has

correct place for component-initialization?

2009-09-17 Thread Alfonso Quiroga
Hi, if I have a Box component, and I have 10 boxes in the same page... and all of them must share data... 1) I must keep the data in the Session? 2) Which method should I use to initialize that data? If I use onActivate() in the Box Component, I think it will be called 10 times (because I have 10 b

Re: [T5.0.18] Out of Memory Error / Potential Leak (doesn't reduce after forced GC)

2009-09-17 Thread Dave Greggory
Thanks Thiago and Howard. Appreciate your insight, couldn't have it done it without your earlier recommendations. I know you're working improving the documentation, so I'd recommend that you note the uber-component anti-pattern in the components section, and for people needing that kind of func

T5.1 Graceful Session Timeout?

2009-09-17 Thread Michael Gentry
Is there a way in T5.1 to have graceful session timeout handling on form submission or links? For example, I have a form with a bunch of inputs and I wait to click the button until my 2-minute session times out (I'm developing/debugging, so a short session expiration). When I submit the form, I g

Re: multiple onActivate methods in page handler

2009-09-17 Thread Szemere Szemere
I have to say this feature nearly killed me when I started using Tapestry. I just couldn't get the logic of how it's supposed to work. I don't think the EventContext method is in the spirit of quick and easy programming, whilst the onActivate doesn't seem very robust. I solved the above issue by us

Re: [Tapestry Central] Tapestry Performance Benchmark (vs. Wicket, JSF, etc.)

2009-09-17 Thread Norman Franke
I'm puzzled by the retained size for 20 sessions. Is that due to how he wrote the app and marked everything as @Persist, or is T5 really that bad? I know I try to minimize the use of @Persist, but the post- redirect model makes this much more difficult, seriously impairing one key aspect of

Re: T5.1 Graceful Session Timeout?

2009-09-17 Thread Kalle Korhonen
Just to prevent nullpointers, in your onActivate() you should have if (object == null) object = new Object(). Obviously that could lead to unexpected results to the user - based on object state you could present a a message to the user etc. but there are quite a few different cases that you need to

Re: [Tapestry Central] Tapestry Performance Benchmark (vs. Wicket, JSF, etc.)

2009-09-17 Thread Howard Lewis Ship
It's a mix; he's storing a lot of WebFlow style data in the session/ I haven't looked at his code (it is downloadable) to see what else he is doing. Ben Gidley's detailed T5 analysis didn't note an exceptional memory utilization. On Thu, Sep 17, 2009 at 2:31 PM, Norman Franke wrote: > I'm puzzle

Re: correct place for component-initialization?

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 16:07:47 -0300, Alfonso Quiroga escreveu: Hi, if I have a Box component, and I have 10 boxes in the same page... and all of them must share data... Hi! 1) I must keep the data in the Session? That's one option. Another one is to have this data store inside a Tapest

Re: multiple onActivate methods in page handler

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 18:27:15 -0300, Szemere Szemere escreveu: I have to say this feature nearly killed me when I started using Tapestry. I just couldn't get the logic of how it's supposed to work. I don't think the EventContext method is in the spirit of quick and easy programming, Why

Re: [Tapestry Central] Tapestry Performance Benchmark (vs. Wicket, JSF, etc.)

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 18:31:11 -0300, Norman Franke escreveu: I'm puzzled by the retained size for 20 sessions. Me too . . . Is that due to how he wrote the app and marked everything as @Persist, or is T5 really that bad? T5 doesn't use the session itself. That's exactly what puzzles me.

Re: Render Page to file, etc

2009-09-17 Thread Nathan Beemer
your suggestion to use servlet Filter was just what I needed... page pdf render now working many thanks! On Aug 24, 2009, at 2:26 PM, Andreas Andreou wrote: The process should be: 1) render the page to a String, perhaps http://www.behindthesite.com/blog/C1931765677/E2094832857/index.html

Re: correct place for component-initialization?

2009-09-17 Thread Alfonso Quiroga
Thanks, in my case I have services injected, but I must store a data in the web layer, session could be. My question is if... it exists a kind of "request scope" (like in struts2) so in my page I have: void onActivate() { myData = "hi there!" } ...and then, in every component I can access myDa

Re: correct place for component-initialization?

2009-09-17 Thread Thiago H. de Paula Figueiredo
Em Thu, 17 Sep 2009 22:46:33 -0300, Alfonso Quiroga escreveu: Thanks, in my case I have services injected, but I must store a data in the web layer, session could be. My question is if... it exists a kind of "request scope" (like in struts2) : Yes it does: @Inject private Request request;

Re: Render Page to file, etc

2009-09-17 Thread Andreas Andreou
great! So, since you went all the way, which tool / library you suggest to convert html to pdf ? On Fri, Sep 18, 2009 at 3:46 AM, Nathan Beemer wrote: > your suggestion to use servlet Filter was just what I needed... page pdf > render now working > > many thanks! > > > On Aug 24, 2009, at 2:26 PM

Re: correct place for component-initialization?

2009-09-17 Thread Alfonso Quiroga
Thanks Thiago, I appreciate your help On Fri, Sep 18, 2009 at 12:16 AM, Thiago H. de Paula Figueiredo wrote: > Em Thu, 17 Sep 2009 22:46:33 -0300, Alfonso Quiroga > escreveu: > >> Thanks, in my case I have services injected, but I must store a data >> in the web layer, session could be. My quest

Re: Render Page to file, etc

2009-09-17 Thread Nathan Beemer
i'm using pd4ml with no complaints. not to say there aren't other libraries just as good if not better On Sep 17, 2009, at 11:28 PM, Andreas Andreou wrote: great! So, since you went all the way, which tool / library you suggest to convert html to pdf ? On Fri, Sep 18, 2009 at 3:46 AM, Nathan

Re: multiple onActivate methods in page handler

2009-09-17 Thread Ilya Obshadko
Exactly. Although multiple onActivate behavior is documented, it took me a few hours to figure out what is really happening, because there is a strong contradiction between expectations and actual behavior; it just doesn't fit the general logic. On Fri, Sep 18, 2009 at 1:27 AM, Szemere Szemere < s