Re: T5: ServletRequestFilter and dependency injection

2008-02-07 Thread Robert Zeigler
You can use the constructor. For example, if you had a servlet request filter called "MyHttpServletRequestFilter", you would have something like: MyHttpServletRequestFilter.java : MyHttpServletRequestFilter implements ServletRequestFilter { private final Logger _logger; public

T5: ServletRequestFilter and dependency injection

2008-02-07 Thread Angelo Chen
Hi, How to inject dependency into a a filter? can't use constructor as it is registered as: public static void contributeHttpServletRequestHandler( OrderedConfiguration configuration) { configuration.add("URLRewriteRequestFilter", new URLRewriteRequestFilter())

Ivy dependency problem for Selenium

2008-02-07 Thread Bill Holloway
So I have ivy.xml written as and run the corresponding ant target with in it. Everything is fine up until the Selenium dependency tries to come in. Then I get [ivy:retrieve] http://repo1.maven.org/maven2/org/openqa/selenium/server/selenium-server/0.8.1/selenium-server-

T5: Palette

2008-02-07 Thread Daniel Pinheiro
How can i use palette with data from DataBase? Can someone help me? -- View this message in context: http://www.nabble.com/T5%3A-Palette-tp15347141p15347141.html Sent from the Tapestry - User mailing list archive at Nabble.com. --

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Davor, That explains my problem, this happens in 5.0.7 and 5.0.9, never tried it with 5.0.8 Davor Hrg wrote: > > I'm debuggin an example like yours, > and although I called ThreadCleanupHub.cleanup() > the list of listeners is empty... and HibernateSessionManager is not in it > > something

Displaying the source of an event

2008-02-07 Thread Hilco Wijbenga
To aid debugging, is it possible to do something like this: @onEvent public void onEvent() { final String componentId = MagicWand.getComponentIdForThisEvent(); final String action = MagicWand.getActionForThisEvent(); System.out.println("Component ID: " + componentId); System.out.pr

T5 getElementById from Layout component

2008-02-07 Thread Baofeng Yu
Hi all, I have a layout component that wraps around a page, say Start.tml. Suppose there is a element on Start.tml. In the Layout.tml header section, I want to have some JavaScript code to change that element. What is the correct way to get that element? It seems document.getElementById('1')

ANN: Tacos 5 - components module

2008-02-07 Thread Igor Drobiazko
Hi all, this week I came across datejs (http://www.datejs.com/) - a nifty JavaScript library for date parsing. This encouraged me to start a new module in Tacos 5 for ajax components. The first one is a mixin that allows you to type a date into a field in a very fast way. If you type something li

Re: [T4] EventListener and invocation of related method

2008-02-07 Thread Igor Drobiazko
Well, I'm not sure but if you can't get the correct value, it looks like a bug to me. On Feb 7, 2008 3:52 PM, Andreas Andreou <[EMAIL PROTECTED]> wrote: > This issue is quite similar to the listener and action parameters of > submit components [1]. > > Currently, the method annotated with EventL

Re: localization of keys returned as properties in T5

2008-02-07 Thread Filip S. Adamsen
Have a look at http://wiki.apache.org/tapestry/Tapestry5HowToAddMessageFormatBindingPrefix - you'd have to change the messageKey String to a Binding and resolve that in the MessageFormatBinding, but then it would basically do what you're asking for. -Filip Brian Long skrev: Sorry about the

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
I'm debuggin an example like yours, and although I called ThreadCleanupHub.cleanup() the list of listeners is empty... and HibernateSessionManager is not in it something is very wrong Davor Hrg On Feb 7, 2008 9:35 PM, Davor Hrg <[EMAIL PROTECTED]> wrote: > you did'nt say if the entity is saved t

Re: JSESSIONID and cookie

2008-02-07 Thread Andreas Andreou
Actually there's a much cleaner alternative described at http://randomcoder.com/articles/jsessionid-considered-harmful Just add a filter that wraps the current HttpServletResponse and overrides the encodeUrl and encodeRedirectUrl so that they just return the passed string - in that way, the contai

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
you did'nt say if the entity is saved to db, if you call commit explicitely, you'll see changes in log, but the way the snippet works is you create entity, you save it to session you change entity... after your task is done, ThreadCleanupHub.cleanup() is called HibernateSessionManager is a list

Re: JSESSIONID and cookie

2008-02-07 Thread prelag
The Problem When developing a web application that you want search engines to actually index correctly, it is important to have clean looking, "friendly", and descriptive links. If you implement friendly urls ( http://tapestry.apache.org/tapestry4.1/usersguide/friendly-urls.html http://tapestry.

Re: can i do this in T5

2008-02-07 Thread Howard Lewis Ship
Yep, Tapestry gives you multiple avenues for reuse, not just inheritance. Being able to use existing components but redefine how data moves in and out of them is subtle and powerful. When people say "Why not Guice? Why not Spring?" ... this approach is based on service configurations with runtime

RE: can i do this in T5

2008-02-07 Thread Mahen Perera
Thanks Howard.. great stuff.. Looks like its easy than I thought.. -Original Message- From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] Sent: 07 February 2008 17:36 To: Tapestry users Subject: Re: can i do this in T5 It would be easier if it were just /myapp/mypage/...arguments... To T

Re: can i do this in T5

2008-02-07 Thread Howard Lewis Ship
It would be easier if it were just /myapp/mypage/...arguments... To Tapestry, the myMethod/...arguments will look like a page activation event context. You can see those values as Object onActivate(Object[] parameters) { } parameters[0] is "myMethod" parameters[1] is "...arguments..."

can i do this in T5

2008-02-07 Thread Mahen Perera
Hi all, This is my requirement. I need to basically have a method which sits in the web tier (it doesn't matter where this method is placed),, it should accept some arguments and return a XML fragment. I need to get this method invoked when the user click on some URL which looks like

Re: localization of keys returned as properties in T5

2008-02-07 Thread Howard Lewis Ship
I hope to extend the property expression language ASR (after stable release) to allow more OGNL type things (such as passing parameters to methods). This could be accomplished as well by creating a custom binding prefix, i.e., "indirect-message:sender.address.addressLine1Label" which would resolve

Re: localization of keys returned as properties in T5

2008-02-07 Thread Josh Canfield
It seems a little strange to me to store resource keys in your objects... but I suppose I could imagine a situation where that'd be the most convenient thing to do. I don't believe there is a binding to fit your needs built-in, but it's something you could add. Check out http://wiki.apache.org/tap

Re: [ANN] InterLDAP : LDAP identity management with T5

2008-02-07 Thread Howard Lewis Ship
Sounds very cool, please add an issue and I'll update the T5 project page to point to your project. On Feb 7, 2008 8:03 AM, Francois Armand <[EMAIL PROTECTED]> wrote: > Kevin Menard wrote: > > Nifty. I'll have to check this out. One of the things I had been looking > > to do was set up one of ou

localization of keys returned as properties in T5

2008-02-07 Thread Brian Long
Sorry about the ambiguous title, but I'll try to explain what it is I'm trying to achieve . . . in T4 it's possible to have properties/keys in an object that can be localized in the html file using the following expression AddressLine1 tapestry will resolve what the contents of "sender.address.a

Re: [ANN] InterLDAP : LDAP identity management with T5

2008-02-07 Thread Francois Armand
Kevin Menard wrote: Nifty. I'll have to check this out. One of the things I had been looking to do was set up one of our internal T5 webapps to auth against our Active Directory instance. I feared I wasn't clear in my explanation :) This soft is not an LDAP authentication API, it's more like

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Davor, Thanks for your ThreadSource, it works and makes threaded tasks in T5 easier, I have included it in my app. however, in my case, the threaded service has insert and update in the same time: Doc doc = new Doc(); session.save(doc); doc.setTitle("test"); i

[T4] EventListener and invocation of related method

2008-02-07 Thread Andreas Andreou
This issue is quite similar to the listener and action parameters of submit components [1]. Currently, the method annotated with EventListener is invoked after all the elements of the form are rewound (like the action parameter does). I've just come across a situation that i would like to have (e

Re: T5: trouble with OrderedConfiguration

2008-02-07 Thread Will Norris
*sigh*... ignore the idiot in the corner. It *was* adding my handler before this one... I just didn't realize there was another handler I needed mine to be *after*. One extra constraint later, and all is good. :-\ -will On Feb 6, 2008, at 10:10 PM, Will Norris wrote: I'm running into a

Re: T5 template selection based on the current request (e.g. request parameters)

2008-02-07 Thread Martin Grotzke
On Thu, 2008-02-07 at 14:26 +0100, Chris Lewis wrote: > I'm not 100% clear either. A page class has one and only one page > template, albeit localizeable. What do you think about the mentioned solution (http://www.nabble.com/T5%3A-Personalizing-page-and-component-template-td14098291.html)? It's

Re: [ANN] InterLDAP : LDAP identity management with T5

2008-02-07 Thread Kevin Menard
Nifty. I'll have to check this out. One of the things I had been looking to do was set up one of our internal T5 webapps to auth against our Active Directory instance. I was going to look into using Atlassian Crowd for it, but if your code makes it simple enough, that would be awesome. -- Kevi

Re: T5 template selection based on the current request (e.g. request parameters)

2008-02-07 Thread Chris Lewis
I'm not 100% clear either. A page class has one and only one page template, albeit localizeable. It seems like you'll need to do at least 2 things: 1. Use a Layout component specific to the user/page. For this you will have your page template wrap itself in a layout component, the exact type o

wiki announce run task in thread

2008-02-07 Thread Davor Hrg
Hi, Ive made an example on how to run a task in a thread. It is simple, I haven't even tested it :D yet http://wiki.apache.org/tapestry/Tapestry5HowToRunTaskInThread anyhow this is how I think i should be properly done any comments are welcom :) Davor Hrg --

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
just added : http://wiki.apache.org/tapestry/Tapestry5HowToRunTaskInThread haven't tested it though :) Davor Hrg On Feb 7, 2008 11:51 AM, Davor Hrg <[EMAIL PROTECTED]> wrote: > you should call ThreadCleanupHub.cleanup() at the > each thread you spawn for your self, or tapestry threaded > resourc

[ANN] InterLDAP : LDAP identity management with T5

2008-02-07 Thread Francois Armand
Hello, I'm very happy (and glad) to announce a first working version of our InterLDAP project. === Project info The mail is growing long, so there are the URL, description follows : Main site : http://interldap.org Demo site : http://wui.demo.interldap.org/wui-interldapD

Re: T5: Hibernate and threaded service

2008-02-07 Thread Davor Hrg
you should call ThreadCleanupHub.cleanup() at the each thread you spawn for your self, or tapestry threaded resources will not get cleaned, and youl make a mem leak. tapestry uses ThreadLocal to store threaded services like Session, for example if any part of the code references session(calls a m

RE: dealing with session objects

2008-02-07 Thread Kristian Marinkovic
I think you are looking for Application State Objects (ASOs) http://tapestry.apache.org/tapestry5/tapestry-core/guide/appstate.html g, kris "T. Papke" <[EMAIL PROTECTED]> 07.02.2008 11:29 Bitte antworten an "Tapestry users" An Tapestry users Kopie Thema dealing with session objects

dealing with session objects

2008-02-07 Thread T. Papke
Hello, maybe this is more an question of understanding rather than implementing... Where to put "global" session objects to? So in a onlineshop application, i have a lot of pages and components. But where is a good place for things like the shoppingcart object? This should be saved somewhere

Re: question to building own components and passing parameters

2008-02-07 Thread T. Papke
Thank you, i have found my problem. Inside my own cartHandler component, i have not set the productid as form context, after doing so and getting the action with "public Object onActionFromCartInsert(long productid){...}", i got the productid and the related quantity. ... xmlns:t="http://tape

Re: T5: HibernateSessionManager and Session

2008-02-07 Thread Davor Hrg
On Feb 7, 2008 10:13 AM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > Got some questions, this is the one i use up to now: > > @Inject private Session session > > Is there a default HibernateSessionManager created somewhere? it is created same time the session is. > second question: > > @I

T5: HibernateSessionManager and Session

2008-02-07 Thread Angelo Chen
Hi, Got some questions, this is the one i use up to now: @Inject private Session session Is there a default HibernateSessionManager created somewhere? second question: @Inject private HibernateSessionManager manager @Inject private Session session In this case session is taken from the man

Re: T5: Hibernate and threaded service

2008-02-07 Thread Angelo Chen
Hi Andy, Thanks for the quick reply, based on that I modified it as follow: @Inject private HibernateSessionManager sessionManager; Object onSuccess() { final Long id = create.append(); sessionManager.commit(); new Thread(new Runnable() { public vo

Re: T5 template selection based on the current request (e.g. request parameters)

2008-02-07 Thread Martin Grotzke
Yep, you're right. But there are several posts that state that there is a one-to-one relationship of page class and template (with support for i18n'ed templates). Having such a simple solution I wonder where these statements come from and if they are completely wrong. And the question is, if the m