Re: [T5] How to replace a service that is used by Automatic Dependency Resolution

2007-09-22 Thread Chris Lewis
It's been suggested that using T5 rendering core as a generic templating system is bad. Using a different system designed for this was the suggested solution (something like velocity). My guess is that won't sit well with you, being that you've progressed as far as you have. At any rate, good l

Re: [T5] Page with same name as package

2007-09-22 Thread Chris Lewis
I'm afraid I don't understand your example: com.mydomain.myapp.pages.package1.Package1 then visit - www.mydomain.com/myapp/package1 Of course this won't work, since 'package1' is not a page name. However 'package1/package1' should. As for your trailing slash issue, I've not seen th

Re: user access control

2007-09-22 Thread Chris Lewis
Ok I realize this thread has been dormant for a while, but I'm back to the issue again. First of all I neglected to mention the first time that I'm using T5. Siddhartha, I dug into MasterDispatcher after finding it and thinking this was how it could be done, but I haven't figured it out yet. I'

get label from page.properties error

2007-09-22 Thread Josh Penza
Is it possible to get the for in a label component from the page.propertiesfile, like this: : Because I get the following Exception: Failure reading parameter for of component product/View:label Could not find a coercion from type java.lang.String to type org.apache.tapestry.Field. The prod

get labels and error messages from pagename.properties

2007-09-22 Thread Josh Penza
First question: Is it possible to get the for in a label component from the pagename.properties file? like this: : Because I get the following Exception: Failure reading parameter for of component product/View:label Could not find a coercion from type java.lang.String to type org.apache.tape

Re: Request Parameters

2007-09-22 Thread Martino Piccinato
It's not clear to me what exactly is your goal if it is, as I think, dinamically generate a tapestry url inside a javascript you should then look at one of the IEngineService (depending on the type of "service" your link will be bound to): http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/

Re: [T5] How to replace a service that is used by Automatic Dependency Resolution

2007-09-22 Thread Josh Canfield
Thanks, I know that that sentiment has been put out there. The challenge is that I have a couple of pages that I want to email. They are very close to existing web-pages so I'd like to be able to take advantage of my tapestry templates. I have contemplated just using a UrlConnection and grabbing th

t5: @Inject hibernate Session into a service?

2007-09-22 Thread Chris Lewis
Hi all, I'm implementing an access control service as a Dispatcher, and contributing it to the MasterDispatcher service. This dispatcher runs just before PageRender... and ComponentAction..., so that it can check if the user is allowed to access the page/resource. This seems to be a very "T5"

T5 chained select box + ajax

2007-09-22 Thread Josh Penza
I am trying to build 2 chained select boxes with Tapestry 5 and Ajax. So the idea is to make the values of the second select box dependent of the first select box. But till now, no success. Does anyone has an example of how to use T5 with Ajax? All help is welcome, Thanks! JP

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread Chris Lewis
I've made a bit of progress. First of all, I realized that I don't need database access for my AccessController (Dispatcher) since it will simply need to check a User object for roles, etc. This object would be created/destroyed by a login page. I did figure out an acceptable way to get at the

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread Lococode
why implementing an access control service ? ^_^ maybe = a wery "T5" way? Chris Lewis-5 wrote: > > Hi all, > > I'm implementing an access control service as a Dispatcher, and > contributing it to the MasterDispatcher service. This dispatcher runs > just before PageRender... and ComponentAct

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
AFAIK, @Inject only works on pages and components. Services are injected into via their constructors, without need of any annotations. Services are singletons by default, but you can use the @Scope annotation to make them per-thread. If however you want the dispatcher to be a singleton, you've g

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
Oh, you snuck in while i was typing :) Please test whether your solution works - i don't think it will... The HibernateSessionManager is a per-thread service, and the current implementation creates a session on construction. So your AccessController constructor will be handed the HibernateSessio

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread Chris Lewis
Let me restate - I do NOT need the HibernateSessionManager, but I DO need an ASO. ASOs are per client/request/thread, so I will have to figure this part out as my service is a Singleton (and I'm not convinced it needs to be per thread). So... couldn't I just inject a reference to the Applicatio

Re: t5: @Inject hibernate Session into a service?

2007-09-22 Thread lasitha
Your logic is fine with regard to the ApplicationStateManager. I wanted to mention the difference with the HibernateSessionManager for the sake of anyone else that happens upon this thread. All the best, lasitha. On 9/23/07, Chris Lewis <[EMAIL PROTECTED]> wrote: > Let me restate - I do NOT need

parameter passing from child page to parent component

2007-09-22 Thread Bryant Castaneda
Hi, I am new to Tapestry and to version 5. I am trying to use a page to pass in the parameter string to my layout component. Example, passing in a title from my page to my layout component. Also, trying to do this without using injection. Let me know if this is feasible. Thanks, - Bryant -- Br