Re: T5: Reading context before persistent fields are read

2009-01-16 Thread Kristian Marinkovic
hi Kalle, i did some experiments on this some time back. my solution was to provide a decorator for the PersistentFieldManager service. This decorator would know it it was in a conversation and save the persistent fields respectivley. I also used the LinkFactory and the LinkFactoryListener to

Re: T5: Reading context before persistent fields are read

2009-01-16 Thread Kalle Korhonen
One proper solution to this is to add a decorator to handle() operations of PageRenderRequestHandler and/or ComponentEventRequestHandler that sticks the required parameters from the activation context somewhere, for example to a request attribute to keep it simple, to make it available to your

Re: T5: Reading context before persistent fields are read

2009-01-16 Thread Kalle Korhonen
Hey Kristian, yeah I ended up with decorators as well. Did your implementation get any further than experimental stage? If it's available somewhere, I'd gladly take a look to compare. Eventually I'll probably make this or some improved version available as part of Trails 2. Kalle On Fri, Jan

Re: Forms

2009-01-16 Thread Sid Ferreira
in the end I managed a different way: created a pdsQuery with @Persist and onSuccess dsQuery sets pdsQuery and it worked. But looks too lame. In jumpstart Geoff used a common submit. Also: is there a way to after the submit hide the Start? Keep it in server.ext/app/ ? On Fri, Jan 16, 2009 at

Re: Forms

2009-01-16 Thread Peter Stavrinides
As far as I know you can use a standard submit button. -- 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

Hiding the Index

2009-01-16 Thread Sid Ferreira
Guys, at this moment Im preparing a small page with a search form wich requires login.After few tests, Ive noticed that the way I did, when I submit the search the index class (Start or Index) appear in the url address. Is there a way to hide it? Forwarding instead of redirecting? Thanks in

Re: T5: Reading context before persistent fields are read

2009-01-16 Thread Kristian Marinkovic
hi kalle, i consider it still experimental. it is only possible to start and stop a conversation programmatically. it is still based on Tapestry 5.0.7-SNAPSHOT. i will try to update it to 5.0.18 over the weekend... g, kris Kalle Korhonen kalle.o.korho...@gmail.com 16.01.2009 09:29 Bitte

Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Fri, 16 Jan 2009 05:59:00 -0300, Peter Stavrinides p.stavrini...@albourne.com escreveu: As far as I know you can use a standard submit button. You're absolutely correct. I *never* used the Submit component, and I'm writing Tapestry 5 applications since 5.0.5 (almost two years ago). :)

Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Thu, 15 Jan 2009 16:58:10 -0300, Sid Ferreira sid@gmail.com escreveu: Object onSuccess() { //new Exception(E... + dsQuery).printStackTrace(); return this; } Never return this in a event handler method. This leads to loss of field values when they are not

Re: Forms

2009-01-16 Thread Sid Ferreira
I was losing the values anyway... On Fri, Jan 16, 2009 at 10:13 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Thu, 15 Jan 2009 16:58:10 -0300, Sid Ferreira sid@gmail.com escreveu: Object onSuccess() { //new Exception(E... + dsQuery).printStackTrace();

Re: Forms

2009-01-16 Thread Thiago H. de Paula Figueiredo
Em Fri, 16 Jan 2009 08:35:54 -0300, Sid Ferreira sid@gmail.com escreveu: I was losing the values anyway... Ooops. I forgot to say that you should return null instead of this. And I just can't see why you say you're losing the fields values, as in no place in your code you print them

RE: T5 and hibernate slowing with more records

2009-01-16 Thread James Sherwood
Hello, Thank you for everyone's input. I had originally taken out the sub queries from the main method and moved them to another method(IE check if city is there if not add it and link the foreign key) and then moved it to a map held in memory(still putting unknown ones in the db) so there were

Re: Forms

2009-01-16 Thread Sid Ferreira
I expected to see them inside the text fields On Fri, Jan 16, 2009 at 10:45 AM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: Em Fri, 16 Jan 2009 08:35:54 -0300, Sid Ferreira sid@gmail.com escreveu: I was losing the values anyway... Ooops. I forgot to say that you should

Where to check that the user is logged in when rendering a page

2009-01-16 Thread Jonathan O'Connor
Hi, I have been reading the documentation, and I haven't seen what I need to find out: How can a page finding that the user is not logged in, it should jump to a login page, and optionally jump back to the requested page? I already know how to check the session to see if a) there is a

[T5] creating event links without the page activation context being encoded into the URL

2009-01-16 Thread Jochen Kemnade
Hello, I've got a problem with creating stateless event links. I've got a page, which has an activation context. On the page, there's a component, that displays images. These images are rendered by a service, which I have injected into the component. In the component, I use an event link and a

Re: [T5] creating event links without the page activation context being encoded into the URL

2009-01-16 Thread Thiago HP
On Fri, Jan 16, 2009 at 8:13 AM, Jochen Kemnade jochenkemn...@web.de wrote: Hello, Hello! I've got a problem with creating stateless event links. I've got a page, which has an activation context. On the page, there's a component, that displays images. These images are rendered by a

T5 AJAX

2009-01-16 Thread Alan Chaney
Hi I'm considering to move to T5 for a major new project. I evaluated T4 at some length a couple of years ago but went a different way for my needs at the time. We have experience with JQuery. I understand that T5 comes with prototype and scriptaculous support. How easy is it to replace

Re: T5 AJAX

2009-01-16 Thread Thiago HP
On Fri, Jan 16, 2009 at 2:02 PM, Alan Chaney a...@compulsivecreative.com wrote: Hi Hi! I'm considering to move to T5 for a major new project. I evaluated T4 at some length a couple of years ago but went a different way for my needs at the time. We have experience with JQuery. I understand

Re: Where to check that the user is logged in when rendering a page

2009-01-16 Thread Jonathan O'Connor
Thiago, thanks very much. That's basically what I did, and it works, but I don't like: a) not having a passivate method (I have no need of one yet) and b) I feel (due to the examples in the documentation) that activate should take a parameter as the id of some object I want to resurrect. No

Re: Where to check that the user is logged in when rendering a page

2009-01-16 Thread Thiago HP
On Fri, Jan 16, 2009 at 2:14 PM, Jonathan O'Connor ninki...@eircom.net wrote: Thiago, thanks very much. You're welcome! b) I feel (due to the examples in the documentation) that activate should take a parameter as the id of some object I want to resurrect. onActivate is a method that

Re: Where to check that the user is logged in when rendering a page

2009-01-16 Thread Thiago HP
On Fri, Jan 16, 2009 at 1:42 PM, Jonathan O'Connor ninki...@eircom.net wrote: Hi, Hi! I have been reading the documentation, and I haven't seen what I need to find out: How can a page finding that the user is not logged in, it should jump to a login page, and optionally jump back to the

Re: [T4.1] OGNL performance problem (serialization)

2009-01-16 Thread Aaron Kaminsky
I found tapestry-prop-1.0.0 at http://howardlewisship.com/tapestry-javaforge/tapestry-prop/. I cannot seem to get it to work in 4.1.3 or 4.1.6. In both cases when I use it on a simple expression I get the exception below. I assumed that this was expected and that tapestry-prop was not

Re: Strange ClassNotFoundException: org.slf4j.Logger

2009-01-16 Thread Ulrich Stärk
I'm having the exact same problem and I checked that it's not there twice... weird... Uli Joachim Van der Auwera schrieb: I assume slf4j is on the classpath twice... Thiago HP wrote: Hi! I'm having a very strange exception when trying to run a T5 application

Re: profiling tapestry components

2009-01-16 Thread Howard Lewis Ship
Are you using Tapestry 5.0.18 or 5.1.0.0-SNAPSHOT? I've added some considerable performance improvements to 5.1. I would get a copy of YourKit and start profiling to see where the actual problems are. Tapestry takes a hit because it renders the entire document to a kind of light-weight DOM

Re: Where to check that the user is logged in when rendering a page

2009-01-16 Thread Joachim Van der Auwera
I would recommend checking out chenillekit-access. See http://www.chenillekit.org/chenillekit-access/index.html Documentation is minimal, but there is an example in the source code. Kind regards, Joachim Jonathan O'Connor wrote: Hi, I have been reading the documentation, and I haven't seen

Re: profiling tapestry components

2009-01-16 Thread Fernando Padilla
I'm using 5.1.0.0. But I'm sorry to confuse you all. I'm not trying to profile Tapestry lowlevel code, I'm trying to profile my own component code :) I want to know collectively how long any one of my component takes to render. The reason I think this view of things would be useful, is

Re: Strange ClassNotFoundException: org.slf4j.Logger

2009-01-16 Thread Ulrich Stärk
Found the problem: http://docs.codehaus.org/display/JETTY/Classloading By default Jetty hides org.slf4j.* from webapp context classloaders, therefore the Form component can't see it. This can be fine-tuned by calling org.mortbay.jetty.webapp.WebAppContext.setServerClasses(String[]) which the

Re: profiling tapestry components

2009-01-16 Thread Howard Lewis Ship
Tapestry so aggressively intermixes framework code and user code that it's going to be hard to pick it out. Futher, Tapestry's queue based (rather than tail recursive) approach makes it much harder to see what's going on. I would still advise you to use YourKit to measure across a long period of

Re: Strange ClassNotFoundException: org.slf4j.Logger

2009-01-16 Thread Martijn Brinkers
But I'm using run-jetty-run successfully for a long time already. I only had to add -Dorg.mortbay.jetty.webapp.parentLoaderPriority=true to the VM-arguments box in the run-jetty-run debug configuration (in Eclipse) Martijn On Fri, 2009-01-16 at 20:52 +0100, Ulrich Stärk wrote: Found the

Re: Strange ClassNotFoundException: org.slf4j.Logger

2009-01-16 Thread Ulrich Stärk
Indeed. That works. Next time I shouldn't rely on what other's are saying doesn't work :) Thanks Martijn. Uli Martijn Brinkers schrieb: But I'm using run-jetty-run successfully for a long time already. I only had to add -Dorg.mortbay.jetty.webapp.parentLoaderPriority=true to the VM-arguments

Finding a block..

2009-01-16 Thread Giaccone, Anthony CTR DTIC-A
I'm working in Tapestry 4.1.6. I've been reading the docs for the Block/RenderBlock and this second sentence has my focus. The Block may be on the same page as the RenderBlock or on another page entirely. Which is followed by an example where the block that is found is on the same page (a

Pages vs Components

2009-01-16 Thread mjparme
In the last couple of days I have been working with Tapestry. I have read Tutorial #1 and all the User Guides articles found here: http://tapestry.apache.org/tapestry5/ I think I understand enough to get going at this point; however, one main point I still don't quite understand (and seems like

Re: Pages vs Components

2009-01-16 Thread Christian Edward Gruber
In some ways, a Page is just a Component that has no parent. I'm not 100% sure why they're separated, except that it's a historical artifact. Components (and pages being a special-case component) are a piece of java software that renders itself (usually as tags and possibly with a body,

T5: SetupRender before parameters binding in 5.1.0.0-SNAPSHOT?

2009-01-16 Thread Yunhua Sang
Hello, Is SetupRender phase changed to be in front of parameters binding in 5.1.0.0-SNAPSHOT? I have a EntityGrid component which is a sub-class of Grid and providing its own GridDataSource; it worked well with 5.0.18. Today I tried the snapshot but got following exceptions:

Re: T5: SetupRender before parameters binding in 5.1.0.0-SNAPSHOT?

2009-01-16 Thread Howard Lewis Ship
There shouldn't be a change there. What is the exception (you only included the stack trace). On Fri, Jan 16, 2009 at 2:01 PM, Yunhua Sang yunhua.s...@gmail.com wrote: Hello, Is SetupRender phase changed to be in front of parameters binding in 5.1.0.0-SNAPSHOT? I have a EntityGrid

Re: Pages vs Components

2009-01-16 Thread Howard Lewis Ship
On Fri, Jan 16, 2009 at 1:42 PM, Christian Edward Gruber christianedwardgru...@gmail.com wrote: In some ways, a Page is just a Component that has no parent. A page is a top level component. Technically, the page component is actually the root component of the actual page (true pages are a

Re: Pages vs Components

2009-01-16 Thread Onno Scheffers
I don't understand when I would use a Component and what they are for. Typically a web-application is built from a number of pages. And each page is different. Many elements on the pages will be the same or similar though. For those elements it is usually wise to create a separate component

Re: T5: SetupRender before parameters binding in 5.1.0.0-SNAPSHOT?

2009-01-16 Thread Yunhua Sang
The exception is NPE, On Fri, Jan 16, 2009 at 5:42 PM, Howard Lewis Ship hls...@gmail.com wrote: There shouldn't be a change there. What is the exception (you only included the stack trace). On Fri, Jan 16, 2009 at 2:01 PM, Yunhua Sang yunhua.s...@gmail.com wrote: Hello, Is SetupRender

Re: T5: SetupRender before parameters binding in 5.1.0.0-SNAPSHOT?

2009-01-16 Thread Howard Lewis Ship
I would be useful to see some of the code of EntityGrid. On Fri, Jan 16, 2009 at 3:22 PM, Yunhua Sang yunhua.s...@gmail.com wrote: The exception is NPE, On Fri, Jan 16, 2009 at 5:42 PM, Howard Lewis Ship hls...@gmail.com wrote: There shouldn't be a change there. What is the exception (you

Re: [T5] improve documentation

2009-01-16 Thread James Hillyerd
I quite like the existing tutorial, I was just disappointed it ended so abruptly. :) I think whatever docs come around in the future, they need to cover more on Encoders/Translators/Coercers - as that was one of the most difficult things for me to learn. Honestly, I still barely understand when

Re: Finding a block..

2009-01-16 Thread Andreas Andreou
Try requestCycle.getPage(otherPage).getComponent(compId) On Fri, Jan 16, 2009 at 10:59 PM, Giaccone, Anthony CTR DTIC-A agiaccon@dtic.mil wrote: I'm working in Tapestry 4.1.6. I've been reading the docs for the Block/RenderBlock and this second sentence has my focus. The Block may be

Re: Transmitting a javascript-value to the server using JSON

2009-01-16 Thread Kalle Korhonen
What's the closest equivalent of T4's EventListener in T5? You can do ActionLink with zone and @OnEvent on the server, but what I loved about T4's EventListener was that you could hook an arbitrary Javascript call to a server side operation with one annotation. I have a case where I'd like to do