Re: [T5]: Hibernate question - session is null

2008-07-28 Thread 9902468
Is the hibernate service initialized at all? When Tapestry starts it lists all known services, is Hibernate in that list? - 99 photos-4 wrote: Thanks for your help, but so far no joy: Quoting 9902468 [EMAIL PROTECTED]: And of course, check that you have Hibernate and hibernate

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread photos
Quoting 9902468 [EMAIL PROTECTED]: Is the hibernate service initialized at all? When Tapestry starts it lists all known services, is Hibernate in that list? - 99 It looks like it: ... FieldValidationSupport: DEFINED FieldValidatorDefaultSource: DEFINED

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread 9902468
Check also that you have the mysql-connector-java-5.1.6.jar or similar in your libraries. I have the following list: FieldValidatorSource: DEFINED FormDAO: DEFINED FormSupport: DEFINED FreeMarkerService:

Re: onActivate with access permission check

2008-07-28 Thread Moritz Gmelin
Hi, this is an almost great solution. Very elegant. It helps for all plain pages. Thanks already. But the dispatcher is not used in service method calls. e.G. I have a service method that retreives an object from the database that a user has uploaded before and it can be downloaded from a

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread photos
Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the maven repository. Code is: - package uk.bl.dlportal.pages.util; import java.util.List; import org.apache.tapestry5.ioc.annotations.Inject; import org.hibernate.Criteria; import

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread Sven Homburg
its look like, that your Security class is only a helper class and no page component. in such classes the @Inject annotation doesnt work 2008/7/28 [EMAIL PROTECTED] Ok, I have just checked. I have mysql-connector-java-5.1.5.jar in the maven repository. Code is:

Re: [T5]: Hibernate question - session is null

2008-07-28 Thread 9902468
Yep, Injection works only in page and component classes that live the ordinary Page or component lifecycle, and are requested from the web. :) Move the session to a real page and have that util to take the session as parameter, or even better move your logic to service that a page can use.

Re: [T5]: Hibernate question - thank you!

2008-07-28 Thread photos
Ok. Great gadzooks! Now I see. Thanks to you and Sven. (I knew this was going to be obvious once pointed out!) p. Quoting 9902468 [EMAIL PROTECTED]: Yep, Injection works only in page and component classes that live the ordinary Page or component lifecycle, and are requested from the web.

AW: [T5] Strange Tomcat Behavior I Can Not Explain

2008-07-28 Thread Martin Kersten
I thought that this issue was overcome by later versions. Never done So and it worked correctly for quite some time... . Can someone verify That this issue is still valid? Cheers, Martin PS: Renat thanks for the answer, I will give it a try! :-) -Ursprüngliche Nachricht- Von: Renat

onActivate called twice when overriding from abstract generic superclass

2008-07-28 Thread Moritz Gmelin
Hi, if I have an abstract superclass of a page that has the abstract definition of onActivate() defined public abstract SuperClassE extends foo { public abstract void onActivate(E value); } and a subclass public SubClass Extends SuperClassBar { public void onActivate (Bar

EJB 3.0 + Tapestry

2008-07-28 Thread draxtor
Hi, Does anyone know some good beginners walkthrough or tutorial about creating enterprise applications with tapestry. Or if anyone has some good advice. I tried by my self with Tapestry 4.15, EJB and Netbeans 6.0 with glassfish container. When I try to run application I got

Re: onActivate called twice when overriding from abstract generic superclass

2008-07-28 Thread Thiago H. de Paula Figueiredo
Em Mon, 28 Jul 2008 10:33:46 -0300, Moritz Gmelin [EMAIL PROTECTED] escreveu: public abstract SuperClassE extends foo { public abstract void onActivate(E value); } public SubClass Extends SuperClassBar { public void onActivate (Bar value) { System.out.println (Here i am +

Re: onActivate called twice when overriding from abstract generic superclass

2008-07-28 Thread Filip S. Adamsen
Hi, As far as I know it's very difficult - if not impossible - for Tapestry to support generics in method parameters because of the way generics are implemented in Java (type erasure). -Filip On 2008-07-28 15:44, Thiago H. de Paula Figueiredo wrote: Em Mon, 28 Jul 2008 10:33:46 -0300,

T5: HttpSession id. How to get it?

2008-07-28 Thread Russell Brown
Hi, I need to HttpSession id. When I call request.getSession(false) I get back a org.apache.tapestry5.services.Session impl called org.apache.tapestry5.internal.services.SessionImpl. This class delegates to an HttpSession instance. But there is no way of getting the actual HttpSession or a

Re: onActivate called twice when overriding from abstract generic superclass

2008-07-28 Thread Thiago H. de Paula Figueiredo
Em Mon, 28 Jul 2008 13:13:21 -0300, Filip S. Adamsen [EMAIL PROTECTED] escreveu: As far as I know it's very difficult - if not impossible - for Tapestry to support generics in method parameters because of the way generics are implemented in Java (type erasure). Not every type information

Re: [T5] Tapestry FLASH Objects ?

2008-07-28 Thread Steven Woolley
If anyone has experience using T5 with red5, I'm all ears (eyes rather). Anyone? Steve On Jul 23, 2008, at 4:05 PM, Antonio wrote: 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

Re: T5: HttpSession id. How to get it?

2008-07-28 Thread Toby Hobson
Hi Russel, Have a look at http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest Toby - Original Message From: Russell Brown [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Monday, 28 July, 2008 12:17:25 PM Subject: T5: HttpSession id. How to get

Re: T5: Assets outside of the WebApp

2008-07-28 Thread Steven Woolley
Is there a problem with simply including it it like so (in your tml). script src=${yahooMin} type=text/javascript/script With this in the page class: @Property private String yahooMin = http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js ; etc.? On Jul 24, 2008, at 5:42 AM, Russell

Using LDAP with tapestry5-acegi

2008-07-28 Thread Hugo Palma
It seems that tapestry5-acegi only works with an DaoAuthenticationProvider. I say this because if no UserDetailsService implementation is provided an error is thrown at startup. So, any ideas how i can use tapestry5-acegi with an LdapAuthenticationProvider ? Thanks.

Re: EagerLoad service doesn't use PerThread service correctly

2008-07-28 Thread Howard Lewis Ship
I went looking for the best way to do this, and didn't find anything I like. Certainly, avoiding static fields is a step in the right direction. I'm going to quickly implement https://issues.apache.org/jira/browse/TAPESTRY-2540 Once you have the Registry, you have the keys to the castle! On

where to put page template

2008-07-28 Thread Argo Vilberg
hi, I read from tutorial where to put start.tml file. /myapps.war/start.tml in .war file. But i must but all .tml file into /myapps.war/start.tml location. I tried also to but login.java and login.tml in same directory, but this dosent work. Argo

Re: T5: How to protect against 'Cross-site request forgery'?

2008-07-28 Thread Martijn Brinkers (List)
Hi Christian, Do you have some example code of you Form extension? Thanks, Martijn On Mon, 2008-07-28 at 15:18 -0400, Christian Edward Gruber wrote: A good way would be to alter the Form object to contain (via a hidden variable) a field that's generated per the whitepaper linked from that

RE: Using LDAP with tapestry5-acegi

2008-07-28 Thread Jonathan Barker
Personally, I like a combination of the InMemoryDaoimpl to provide the UserDetailsService (great for development and admin accounts) and then LDAP. Here's a modified extract from an AppModule file - I've clumped together things that could be separated, but you get the idea. This uses

Re: T5: How to protect against 'Cross-site request forgery'?

2008-07-28 Thread Howard Lewis Ship
I wonder if this could be created as a Mixin? Also, the internal LinkFactory service has listeners that know when an action link is created; it might be possible to automatically add a query parameter to every link with authentication, and then provided filters in the ComponentEventRequestHandler

Re: where to put page template

2008-07-28 Thread Howard Lewis Ship
On Mon, Jul 28, 2008 at 12:08 PM, Argo Vilberg [EMAIL PROTECTED] wrote: hi, I read from tutorial where to put start.tml file. /myapps.war/start.tml in .war file. But i must but all .tml file into /myapps.war/start.tml location. I tried also to but login.java and login.tml in same

Re: T5: How to protect against 'Cross-site request forgery'?

2008-07-28 Thread Martijn Brinkers (List)
Thanks, I'll look into that and write my findings (if I succeed ;-) on the WIKI. Martijn On Mon, 2008-07-28 at 12:27 -0700, Howard Lewis Ship wrote: I wonder if this could be created as a Mixin? Also, the internal LinkFactory service has listeners that know when an action link is created;

What if Tapestry's I18N was just UTF-8?

2008-07-28 Thread Howard Lewis Ship
Here's a question. I'm still struggling with getting Tapestry to do the right encoding when producing output, and to set the response encoding to the correct value before reading query parameters. There's lots of edge cases, related to Ajax, to form uploads, and to complex components, such as

Re: What if Tapestry's I18N was just UTF-8?

2008-07-28 Thread Thiago H. de Paula Figueiredo
Em Mon, 28 Jul 2008 21:17:11 -0300, Howard Lewis Ship [EMAIL PROTECTED] escreveu: What if there was just a single default application character set, which would default to UTF-8? This is not a nice option. Web applications that need accented characters (most Latin languages), but don't

For Hire: Tapestry Developer and App Architect

2008-07-28 Thread Jeremy F. Kassis
Hi Everyone, Thanks to everyone on this list for their continuing support on Tapestry technical issues. Hopefully you all can help me land some new Tapestry work too. :-) Here's a little about me: I have over 11 years of experience in client/server and distributed systems - including 4 recent

Re: onActivate called twice when overriding from abstract generic superclass

2008-07-28 Thread Ivan Dubrov
Filip S. Adamsen wrote: Hi, As far as I know it's very difficult - if not impossible - for Tapestry to support generics in method parameters because of the way generics are implemented in Java (type erasure). A lot of type information is still available through reflection. Assuming