Re: Error on overriding file upload limit

2012-05-10 Thread nazarhussain_s
Hi, Currently In this class i have property name and I have less knowledge on how to add a property attribute here whether the property-name and property are one and same or do I have to add another attribute property here and what value do I have to assign to that attribute.If I

Re: Getting Session State Object from another servlet alongside Tapestry

2012-05-10 Thread Kartweel
Thanks. That seems like a better approach, rather than ignoring it, to still process it but pass it onto the other servlet. I guess the trick is making the request filter pass it into Vaadin, so I need to find out how Vaadin needs it to work. I guess instantiate the Vaadin servlet and just pass

Re: Basic question about URL rewriting and Tapestry 5

2012-05-10 Thread Steve Eynon
Yeah, I was quite dismayed when the old URL Rewriter API disappeared to make way for the LinkTransformer - it'd be great if something similar was resurrected! In the mean time, I'm checking out Lance's suggestion. Steve. On 10 May 2012 20:40, Thiago H. de Paula Figueiredo wrote: > On Thu, 10

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
Thanks guys this has been a very big piece of tapestry I never really understood. On Thursday, May 10, 2012, Howard Lewis Ship [via Tapestry] wrote: > Historically, constructor injection came first; direct field injection > (which uses reflection) came laster, in part because of student in one >

Re: Using generics in tapestry service.

2012-05-10 Thread Howard Lewis Ship
Historically, constructor injection came first; direct field injection (which uses reflection) came laster, in part because of student in one of my workshops pointed out the inconsistency. I generally prefer constructor injection as well, since the field can then be marked "final". That gives me

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Keep in mind that you don't need to use @Inject in your services. Tapestry will use the constructor with the most arguments and will pass values matched by type (and annotations) from the registry. I prefer the constructor injection to private field injection as I can test my services without need

Re: Using generics in tapestry service.

2012-05-10 Thread Thiago H. de Paula Figueiredo
On Thu, 10 May 2012 14:04:17 -0300, George Christman wrote: Thanks guys, I wasn't aware we could use tapestry inject outside of pages and components. Tapestry-IoC (which is independent of Tapestry-Core, which is the web framework) is able to inject services into any object created by T

Re: [t5.3.1] Tapestry OutOfMemoryError

2012-05-10 Thread Howard Lewis Ship
I can say that it has something to do with encoding data into a rendering Form (the "t:formdata" hidden field). Is it possible you have an very, very, very large form (possibly an infinite loop)? Somewhere in your console, there should be an operations trace from Tapestry that may shed more light

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
Thanks guys, I wasn't aware we could use tapestry inject outside of pages and components. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-generics-in-tapestry-service-tp5700399p5700938.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: Using generics in tapestry service.

2012-05-10 Thread Howard Lewis Ship
Due to type erasure, Tapestry doesn't see the generics when using ServiceBinder.bind(), and that's the preferred way to define services now (there's almost no need at this point to use service builder methods, except for rare cases where the the service implementation is generated on the fly). I

Re: Using generics in tapestry service.

2012-05-10 Thread Taha Hafeez Siddiqi
Use either @InjectService("serviceId") private MyService myService; or @ServiceId("serviceId") @Inject private MyService myService; Sent from my iPhone On May 10, 2012, at 10:10 PM, George Christman wrote: > Well It worked for a single service implementing the interface, as soon as I > ad

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
Well It worked for a single service implementing the interface, as soon as I added a second service it blew up :( I was given this exception Caused by: java.lang.RuntimeException: Error building service proxy for service 'Scheduler' (at org.mydomain.eprs.services.Scheduler(HibernateSessionSource,

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
Thanks guys, I figured it out. I completely missed the "build" in your example. Anyhow works like a charm. Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-generics-in-tapestry-service-tp5700399p5700785.html Sent from the Tapestry - User mailing list archive a

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
This is my real world code, I'm just confused with the service id despite reading the docs over and over. public static void bind(ServiceBinder binder) { binder.bind(UserInfo.class, UserInfoImpl.class); binder.bind(AutocompleteCache.class, AutocompleteCacheImpl.class);

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Tapestry has naming conventions in the AppModule and "build" methods must start with the word "build" (or use equivelant annotations). You haven't shown me your code but it looks like your method is called "userDoSomethingClass()". If you take a look at the code I gave you, the method is called "b

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
Lance anychance you could provide me with a sample of the build method? I seen this in the Tap docs, just doesn't make total sense to me. package org.example.myapp.services; public class MyAppModule { public static Indexer build() { return new IndexerImpl(); } } -- View this message

Re: Using generics in tapestry service.

2012-05-10 Thread Taha Hafeez Siddiqi
To differentiate between services you can either use different annotations or different service ids. For annotations read "Disambiguation with Marker Annotations" under http://tapestry.apache.org/defining-tapestry-ioc-services.html For serviceIds read "Service Ids" under the same link regards

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
You need to call the method "build" where is the name of the service. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Using-generics-in-tapestry-service-tp5700399p5700637.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
2012-05-10 11:24:04.649:WARN::failed app: java.lang.RuntimeException: Module class org.mydomain.eprs.services.AppModule contains unrecognized public methods: public org.mydomain.eprs.services.DoSomethingClass org.mydomain.eprs.services.AppModule.userDoSomethingClass(). 2012-05-10 11:24:04.649:WARN:

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
Can you paste the code and the entire error message (I get the feeling there's more to the message). This page explains using service id's or annotations to differentiate services with the same interface http://tapestry.apache.org/defining-tapestry-ioc-services.html -- View this message in contex

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
When I placed your code snippet in the app module, it gave me the following exception contains unrecognized public methods: public org.mydomain.eprs.services.doSomethingClass I guess if this isn't possible, I'll just have to do this a different way. I at least wanted to try your suggestion first

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
I can't say that I've used generic services before. I was assuming that under the hood, Tapestry would think that there were two instances of the same interface (due to type erasure). I have provided you with a way of dealing with two services of the same interface. Tapestry also supports custom ma

Re: Using generics in tapestry service.

2012-05-10 Thread George Christman
That would be great Taha. Lance, I'm assuming your suggestion is a work around to what Taha just recently stated. Would I still need to provide bindings for either buildUserDoSomethingClass or my doSomethingClass's? Thanks, George -- View this message in context: http://tapestry.1045711.n5.nab

Re: Using generics in tapestry service.

2012-05-10 Thread Taha Hafeez Siddiqi
Hello Unfortunately generics are not supported by Tapestry Services. ASM 4, to which Plastic will be upgraded to soon, has support for Generics (http://weblogs.java.net/blog/forax/archive/2011/04/17/asm-4-rc1-released) so hopefully it might be in the coming version. regards Taha On May 10, 20

Re: Using generics in tapestry service.

2012-05-10 Thread Lance Java
You would probably want to do it like this: AppModule.java --- public DoSomethingClass buildUserDoSomethingClass() { return new DoSomethingClassImpl(); } public DoSomethingClass buildDateDoSomethingClass() { return new DoSomethingClassImpl(); } Page.java - @Inject @Name

Re: private final DateFormat in PropertyDisplayBlocks (BUG)

2012-05-10 Thread Dimitris Zenios
I managed to add JodaTime into my tapestry 5 application with many little modifications.I had to create a coercer from dateTime to date and reverse and just contribute beanDisplayBlock and beanEditBlock to provide ways of showing and editing jodaTime.In the end it has exactly the same effect as usi

Re: Cache avaiable to all user sessions

2012-05-10 Thread George Christman
Thanks Taha, When I get some time, I'll look into this deeper. Looks pretty interesting. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cache-avaiable-to-all-user-sessions-tp5697890p5700402.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Using generics in tapestry service.

2012-05-10 Thread George Christman
Hello, still new to the Tapestry Service, so not sure if this is possible. I have a class that implements an interface, both which are generics. //Class public abstract class DoSomethingClassImpl implements DoSomethingClass { //Interface public interface DoSomethingClass { //AppModule pub

Re: Basic question about URL rewriting and Tapestry 5

2012-05-10 Thread Thiago H. de Paula Figueiredo
On Thu, 10 May 2012 08:58:50 -0300, Steve Eynon wrote: It's just that implementing a LinkTransformer is lot of work and constructing / deconstructing PageRenderRequestParameters from a raw Request is not a simple task. Whereas the external solutions offer a simple search / replace functionali

Re: Basic question about URL rewriting and Tapestry 5

2012-05-10 Thread Lance Java
FYI, I was able to do URL rewriting using simple string manipulation by decorating the ComponentEventLinkEncoder https://github.com/uklance/tapestry-sandbox/blob/master/src/main/java/com/github/uklance/mode/ModeComponentEventLinkEncoder.java -- View this message in context: http://tapestry.10457

Re: Basic question about URL rewriting and Tapestry 5

2012-05-10 Thread Steve Eynon
It's just that implementing a LinkTransformer is lot of work and constructing / deconstructing PageRenderRequestParameters from a raw Request is not a simple task. Whereas the external solutions offer a simple search / replace functionality on the url. Steve. On 8 May 2012 19:53, Thiago H. de

Re: [t5.3.1] Tapestry OutOfMemoryError

2012-05-10 Thread Thiago H. de Paula Figueiredo
On Thu, 10 May 2012 06:14:10 -0300, Muhammad Gelbana wrote: This exception is thrown in the logs randomly and I can't track it ! It looks like tapestry failed to do something but It must be something in my code, although the stacktrace isn't helping. java.lang.OutOfMemoryError at java.util

Trouble related with beaneditform, beanmodel and propertyconduit

2012-05-10 Thread ramonchu
Hi everybody. I'm trying to edit an entity via a beaneditform which has some other entities inside. I'll write down a simple case so that it's easy to understand the issue. The tml file has the following line: This object member is an EntityB object: public class EntityB{ private String

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

2012-05-10 Thread ramonchu
Thanks, Lance. I'll try that suggestion. -- View this message in context: http://tapestry.1045711.n5.nabble.com/getting-the-object-in-a-row-from-a-grid-component-tp5687588p5699865.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

[t5.3.1] Tapestry OutOfMemoryError

2012-05-10 Thread Muhammad Gelbana
This exception is thrown in the logs randomly and I can't track it ! It looks like tapestry failed to do something but It must be something in my code, although the stacktrace isn't helping. "http-bio-80-exec-14" is the thread name. "ExceptionReport" is the exception report page I have. It looks l

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

2012-05-10 Thread Lance Java
ramonchu - In a roundabout way, you have done exactly what you would have done in a value encoder except that it is not re-usable in another page. Tapestry will take the Object[] array and will coerce it to a String and write it to the html of the page. I'd recommend using a ValueEncoder instead.

Re: tapestry-push - proof of concept

2012-05-10 Thread Lance Java
Thanks for the link Giulio, I'm sure I could achieve something quite similar using DWR and Tapestry side by side. I'm hoping for a far more integrated approach using tapestry's templating for html and zero javascript. Cheers, Lance. -- View this message in context: http://tapestry.1045711.n5.nab

Re: tapestry-push - proof of concept

2012-05-10 Thread Lance Java
Ok, thanks for this. The only problem that I can see is that I don't have the event context at the time I am constructing the URL. I will only have the context in my asynchronous push event. I'll take a look at how tapestry adds the context to the URL in ComponentResources.createEventLink(String e

Re: tapestry-push - proof of concept

2012-05-10 Thread Giulio Micali
I don't know if it's what you are looking for, but some time ago I found this article: http://spreadthesource.com/2010/11/bringing-realtime-to-your-java-applications-with-websockets-nodejs-redis-tapestry-5/ Hope can be useful. Cheers, Giulio

Re: Null Pointer Exception

2012-05-10 Thread Lance Java
I've just taken a look at the 5.2.6 code for ResourceStreamerImpl and it looks like the input stream is being closed twice via is.close() and InternalUtils.close(is). This looks like a bug to me try { is = streamble.getStream(compress); OutputStream os = re

Re: Null Pointer Exception

2012-05-10 Thread Lance Java
I hastily jumped to the conclusion that it was your code which was calling close(). It could also be a bug in Tapestry. As I said before, I could be wrong but this sounds like a strange issue that I have had in the past. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Null-

T4: an official 4.1.7 build?

2012-05-10 Thread Patrick Moore
Hi there -- We are using 4.1.7-SNAPSHOT because it has some fixes from the last official build 4.1.6. Using the snapshots have been fine for a while. Unfortunately the last few months have new 4.1.7-SNAPSHOT builds being deployed with no changes. It looks like some sort of automated build process