String translator for components?

2012-05-09 Thread bhorvat
Hi all, I am having a class which acts like a holder for the ajaxforloop row. It is a generic class which accepts an Object that has values for the row. Something like this public class ItemSingleHolder extends ItemHolder { private T value; public ItemSingleHolder(Long key, T value ) {

Re: Cache avaiable to all user sessions

2012-05-09 Thread Taha Hafeez Siddiqi
Hi George I would use the ORM caching techniques for these cases. http://www.ehcache.org/documentation/ regards Taha On May 10, 2012, at 12:04 AM, George Christman wrote: > Figured it out Thiago, I just needed to do the following. > >private AutocompleteCache autocompleteCache; > >

Re: Null Pointer Exception

2012-05-09 Thread Simon Raveh
Thanks, But I searched my all project and this is not in my code. Thanks again, I"ll keep looking. Simon On 5/9/12 2:39 PM, "Lance Java" wrote: >I think you might be explicitly calling close() on the response >outputstream somewhere in your code which you shouldn't do. It's the >servlet c

Re: Null Pointer Exception

2012-05-09 Thread Lance Java
I think you might be explicitly calling close() on the response outputstream somewhere in your code which you shouldn't do. It's the servlet container's responsibility and I think it's failing when tomcat is trying to close() a stream that has already been closed. I could be wrong too ;)

Null Pointer Exception

2012-05-09 Thread Simon Raveh
Hi All, I have a Tapestry 5.2.6 Application in production running on Tomcat 7. In general everything is running smoothly but from time to time I get the exception below. I did not get any user complain related to it, so I can't really attached it to any specific operation a user does. I did not se

Re: tapestry-push - proof of concept

2012-05-09 Thread Howard Lewis Ship
On Wed, May 9, 2012 at 9:01 AM, Lance Java wrote: > I see... I might keep going with the DWR approach then. So If I understand > your proposal. > > 1. Use the incoming page request (& component resources) to generate a URL. > Should this URL be to "activate" to component or to do the actual work (

Re: Error on overriding file upload limit

2012-05-09 Thread Howard Lewis Ship
Did you actually read the exception message at the bottom? On Wed, May 9, 2012 at 6:16 AM, nazarhussain_s wrote: > Hi, >    I am using Tapestry 4.0 in my project.Currently In my application I get > the following exception on uploading larger documents of size more than 5 MB > > > org.apache.hivem

Re: Cache avaiable to all user sessions

2012-05-09 Thread George Christman
Figured it out Thiago, I just needed to do the following. private AutocompleteCache autocompleteCache; public Scheduler(Session session, AutocompleteCache autocompleteCache) { this.session = session; this.autocompleteCache = autocompleteCache; } p

Re: Cache avaiable to all user sessions

2012-05-09 Thread George Christman
So if I understand you correctly, should I be doing this in my scheduler class? @Inject private AutocompleteCache autocompleteCache; public void run() { List users = session.createCriteria(ApplicationUser.class).list(); autocompleteCache.sto

Re: Cache avaiable to all user sessions

2012-05-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 May 2012 14:59:19 -0300, George Christman wrote: Hi Thiago, This is what I've done, "Still don't completely understand tap services though". Services are the same as beans in Spring and EJB: objects that are instantiated by the container (T-IoC, Spring, EJB, etc) and can be i

Re: Cache avaiable to all user sessions

2012-05-09 Thread George Christman
Hi Thiago, This is what I've done, "Still don't completely understand tap services though". Although the cache is being populated, I'm unable to Inject it into the page and retrieve the results. Hopefully you can help me to clarify how to use this as a service. //My app module public class AppMod

Re: Cache avaiable to all user sessions

2012-05-09 Thread Thiago H. de Paula Figueiredo
On Wed, 09 May 2012 13:24:36 -0300, George Christman wrote: Hello, I'm wondering if there is a way to build a cached collection in tapestry which could be made available to all user sessions. Why don't you put this collection inside a service and make all operations in this collection pas

Cache avaiable to all user sessions

2012-05-09 Thread George Christman
Hello, I'm wondering if there is a way to build a cached collection in tapestry which could be made available to all user sessions. I have a large user list I'm currently storing in the users session as a cached treemap which is used for my autocomplete component. I'd like to do this once and use m

Re: getting the object in a row from a grid component

2012-05-09 Thread ramonchu
Thanks for all the answers. I finally got a way. In the template I used something like this: Consult And then I implement public Object[] getContext(){ return new Object[] { ... }; // I get some fields from the object and put them in an array } Object getElement(Objec

Re: tapestry-push - proof of concept

2012-05-09 Thread Lance Java
I see... I might keep going with the DWR approach then. So If I understand your proposal. 1. Use the incoming page request (& component resources) to generate a URL. Should this URL be to "activate" to component or to do the actual work (eg "doPush" in my example)? 2. In the asynchronous event (n

Re: tapestry-push - proof of concept

2012-05-09 Thread Howard Lewis Ship
On Wed, May 9, 2012 at 8:42 AM, Lance Java wrote: > Interesting to know you are thinking about push for tapestry. I know that DWR > have done quite a bit of work to abstract the underlying mechanism for push > (comet / polling / piggyback), do you think that you would roll-your-own > push mechanis

Re: tapestry-push - proof of concept

2012-05-09 Thread Lance Java
Interesting to know you are thinking about push for tapestry. I know that DWR have done quite a bit of work to abstract the underlying mechanism for push (comet / polling / piggyback), do you think that you would roll-your-own push mechanism or do you have a library in mind? -- View this message i

Re: tapestry-push - proof of concept

2012-05-09 Thread Howard Lewis Ship
You might need to put a fake Request object into RequestGlobals for Tapestry to be happy. You can use existing (public) Tapestry services, and the component's ComponentResources, to generate a Link object; plugging that link's URL into the fake Request's path property and using the normal Tapestry

Re: choose multiple entity's of object

2012-05-09 Thread nkv1
I belive i have done what i have been asked to do -- View this message in context: http://tapestry.1045711.n5.nabble.com/choose-multiple-entity-s-of-object-tp5695777p5696727.html Sent from the Tapestry - User mailing list archive at Nabble.com. ---

tapestry-push - proof of concept

2012-05-09 Thread Lance Java
Hi guys, I've been thinking about a "push" component for a while and I thought I might make a start when I got some free time. I will be using an abstraction on top of DWR's reverse ajax to achieve this. Basically, it will look something like this: ItemsComponent.tml ${i

Re: Zone refresh in form fragment 'wizard'

2012-05-09 Thread Chris Cureau
No takers? Ah well...I'll break it into separate pages. I just wish I knew what I was doing wrong. Maybe a renderobject in the template would help? Igor, can't wait for your book! On May 8, 2012 10:25 AM, "Chris Cureau" wrote: > I've looked at the form fragments in firebug. It doesn't appear tha

Re: Tapestry-zbreadcrumbs [ New breadcrumbs module ]

2012-05-09 Thread Dimitris Zenios
Hi Andreas Thanks for the response. You dont need sonatype snapshots dependency.This will do org.oscy tapestry-zbreadcrumbs 0.0.1 Maybe remove the old one from your local repository if you tried to download it before getting synced with maven central Best Regards Dimitris Zenios OSCY t

Re: Best place to initialize form data

2012-05-09 Thread Geoff Callender
I favour consistency too, but I'd go the other way: beaneditor should catch the NPE and throws an exception that explains the principal involved, ie. that it is up to you to provide initial object(s) that the form will overlay with its input and hidden fields. The thing is, a Form may relate to

Re: Tapestry-zbreadcrumbs [ New breadcrumbs module ]

2012-05-09 Thread Andreas Pursian
Hi Dimitris, your breadcrumb component is working flawlessly, thank you. If there's somebody out there, who is looking for the correct maven configuration, here are the necessary informations for the repo and dependency to receive the artifact: https://oss.sonatype.org/content/repositories/snapsho

Re: Getting Session State Object from another servlet alongside Tapestry

2012-05-09 Thread Lance Java
Instead of implementing a HttpServletRequestFilter that is not managed by tapestry, you could contribute a org.apache.tapestry5.services.RequestFilter instead. In your AppModule add the following public void contributeRequestHandler(OrderedConfiguration configuration) { configuration.