T5: stream binary files

2008-07-23 Thread Chris Lewis
Hello, I'm curious if there is a common way to stream binary files like images, PDFs, etc. I've read http://wiki.apache.org/tapestry/Tapestry5HowToStreamAnExistingBinaryFile and understand that method, but something just feels wrong about using a page for this kind of operation (after all, it's no

Re: @Environment problem

2008-07-23 Thread Chris Lewis
Petros, Instead of RenderSupport, try DocumentLinker. It should be available in such cases, the only issue is that it's internal. I don't remember if the "rules" are not to use internal services at all, or simply not to extend them. chris Petros Petrou wrote: > Thanks Kris/Sven, > > The version

Re: [T5] Hibernate integration problems/questions

2008-07-23 Thread 9902468
>From the documentation: The transaction will be committed when the method completes normally. The transaction will be aborted if the method throws a RuntimeException. The transaction will be committed if the method throws a checked exception (one listed in the throws clause of the method). An

Re: @Environment problem

2008-07-23 Thread Kristian Marinkovic
hi chris, the DocumentLinker is a service is a service that is only accessible via the RenderSupport service and therefore suffers the same problem see TapestryModule: public void contributeMarkupRenderer(...) { MarkupRendererFilter pageRenderSupport = new MarkupRendererFilter() { publi

Re: T5: stream binary files

2008-07-23 Thread Kristian Marinkovic
hi chris, instead of having the page return a StreamResponse you could a define a ComponentEventResultProcessor that will convert the result of a component event into a StreamResponse transparently eg. Document onSubmit() { return new Document("path/file.pdf"); } registered service: Docume

Re: [T5] Hibernate integration problems/questions

2008-07-23 Thread Filip S. Adamsen
Hi, It's not a technical limitation, but if I recall correctly it mirrors the way EJB handles exceptions. I'm actually surprised this is not configurable... -Filip On 2008-07-23 13:12, 9902468 wrote: From the documentation: The transaction will be committed when the method completes norma

T5: using SessionManager in a dispatcher

2008-07-23 Thread Angelo Chen
Hi, I use a dispatcher to log page access, I need to use sessionManager to commit otherwise the log will not be saved to the mysql, however, the commit sometimes produce undesirable effects to the page, is there a way to maintain a separate sessionManager in addition to the default SessionManager

[t5]: testing for null number

2008-07-23 Thread photos
I notice that t:if coerces number objects (Long, Integer, etc) and tests for zero or non-zero. I want to test for null or not null using a number data type. Is there any way to do this? - To unsubscribe, e-mail: [EMAIL

RE: T5: stream binary files

2008-07-23 Thread Jonathan Barker
It takes some getting used to, but it just removes the need to create a service as in T4. Your page is a service. > -Original Message- > From: Chris Lewis [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2008 07:03 > To: Tapestry users > Subject: T5: stream binary files > > Hello,

[T5] Tapestry & FLASH Objects ?

2008-07-23 Thread Antonio Fernández - STAR Málaga
Hi all, ! viva Tapestrón ! I´m looking for information about working with Tapestry 5 & FLASH, but seems there aren´t so many information. - Is Tapestry 5 really ready for supporting this tecnology ? - Is there some JavaScript Toolkit Library ready for handling the Flash object and it coul

Re: [T5] Tapestry & FLASH Objects ?

2008-07-23 Thread Toby Hobson
I've been using T5 and Flash (OpenLaszlo) successfully, I'm currently writing a tutorial about it ... i'll let you know when i publish it. In the meantime if you have any specific questions feel free to email me Toby - Original Message From: Antonio Fernández - STAR Málaga <[EMAIL PR

Re: [T5] Tapestry & FLASH Objects ?

2008-07-23 Thread Antonio
Sounds great ! First of all i´m going to learn more about this framework. The questions would be here in the near future ... :-D Many thanks again & good luck with your tutorial Greetings, Passi - Original Message From: Antonio Fernández - STAR Málaga <[EMAIL PROTECTED]> To: Fra

Re: T5: stream binary files

2008-07-23 Thread Chris Lewis
Thanks Kristian - I've messed with dispatchers a bit and am playing with that route. Now I've run into an interesting hibernate session issue, but that's for a new thread :-) thanks for your input chris Kristian Marinkovic wrote: > hi chris, > > instead of having the page return a StreamResponse

T5.0.14-SNAPSHOT: strange behavior Dispatcher when using a Session

2008-07-23 Thread Chris Lewis
Hello, I have a dispatcher that uses a hibernate session. The dispatcher is auto bound and receives the session in the constructor. I'm using tapestry-hibernate so that session instance is a proxy that gets the real session for the current thread (right?). Now in testing my dispatcher, I give it a

Converting type of request parameter error

2008-07-23 Thread luna_guo
tapestry5.0.13 @Inject private org.apache.tapestry5.services.Request request; String param=request.getParameter(PARAM_NAME); int id=coercer.coerce(param,Integer.class); log.debug(PARAM_NAME+" is "+param); //it's ok, display a number. int id=Integer.getInteger(param.toString()); //The error mess

notice: users of autocompleter

2008-07-23 Thread Paul Stanton
I've recently noticed that the autocompleter runs the getValues method twice for every search string. Therefore you can improve performance by almost 50% by adding some simple caching, especially if your search is driven externally (ie DB). For example: public class MyAutocompleteModel implem