Setting locale based on domain

2010-12-15 Thread Kai Weber
Hi all, since version 5.1 the ComponentEventLinkEncoder determines and sets the locale for the current thread. In version 5.0 this was the job of a RequestFilter. We used a solution like the one in the wiki[1] to set the locale based on other request criteria. The RequestFilter still works for n

Best practice, converting a text field value

2010-12-07 Thread Kai Weber
Hi, the user provided input from a TextField/TextArea component should be cleaned from HTML tags. No validation is needed, the requirements are just "remove the HTML", display the result to the user. The first variant I tried is a Translator. This solution works but because there are other possib

Re: Injecting Tapestry Services into Spring beans

2010-10-06 Thread Kai Weber
* Jeshurun Daniel : > Ok please ignore that it was just me being stupid. I got it working > now. Thanks. Could you tell us, what you had to do to got it working? Kai - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.o

LinkSubmit component bug (TAP5-1180)

2010-08-19 Thread Kai Weber
Hi, we are hit by the bug described in TAP5-1180 (the same as TAP5-930, which was closed "Incomplete"). The findings the reporter of the bug Paul Stanton made are the same we suspect to be the problem. How do other people on this list solve this problem? Does anybody use the LinkSubmit component?

Looking for workaround for TAP5-856 in 5.1.0.5

2010-06-28 Thread Kai Weber
Hi, we just upgraded from 5.0.x to 5.1.0.5. We are hit by TAP5-856. Is there a workaround for 5.1.0.5 available? Upgrading to 5.2 is currently no option for us. https://issues.apache.org/jira/browse/TAP5-856 Regards, Kai - To u

Re: Customising T5 URL Encoding

2010-06-20 Thread Kai Weber
* Nicolas Bouillon : > The Tapestry URL encoding is not a problem for me in general, just for one > use case when i wanted to migrate a site to tapestry and keeping the same > URL (with accents, spaces, dashes, underscores and so on). It is a problem if you get called by other webapps. If they ca

[Fixed] Re: Overriding RememberMeServices in tapestry-spring-security

2010-06-11 Thread Kai Weber
* Kai Weber : > Any ideas? How can I override this service. Btw, I already tried _all_ the > methods described on the webpage > http://tapestry.apache.org/tapestry5.1/tapestry-ioc/cookbook/override.html Fixed it myself. Had a typo in the decorate* method. Seems, you have to use the d

Overriding RememberMeServices in tapestry-spring-security

2010-06-11 Thread Kai Weber
Hi, I have to override a service defined in tapestry-spring-security 2.1.0, T5 is 5.1.0.4: @Marker(SpringSecurityServices.class) public static RememberMeServices build( final UserDetailsService userDetailsService, @Inject @Value("${spring-security.rememberme.key}"

[Solved] Re: Overriding RememberMeServices in tapestry-spring-security

2010-06-11 Thread Kai Weber
* Kai Weber : > Any ideas? How can I override this service. Btw, I already tried _all_ the > methods described on the webpage > http://tapestry.apache.org/tapestry5.1/tapestry-ioc/cookbook/override.html Solved it. Had a typo in decorateRememberMeService which should be decorateRememberM

Overriding RememberMeServices in tapestry-spring-security

2010-06-11 Thread Kai Weber
Hi, I have to override a service defined in tapestry-spring-security 2.1.0, T5 is 5.1.0.4: @Marker(SpringSecurityServices.class) public static RememberMeServices build( final UserDetailsService userDetailsService, @Inject @Value("${spring-security.rememberme.key}")

Setting a default value for input fields

2010-03-16 Thread Kai Weber
Hi, if I have a page with an input field which I want to set to a default value. After the form was displayed and submitted the value of the input field should be left alone and not changed anymore. What is the recommended way to do it? My current solution is the following, but I feel I miss some

Re: RenderInformals on Component With Template

2009-09-21 Thread Kai Weber
Josh Canfield schrieb: > This component will grab the first element from the template and add > all the informal parameters to it. Cool. But it grabs the first element of the outer component. If I have + form + | +- div | +- div | +- component it alway

RenderInformals on Component With Template

2009-09-18 Thread Kai Weber
Hi, I have *exactly* the same problem as the user adamh in June 2008. He hasn't got an answer. Does, one year later, anyone has a glue? http://www.nabble.com/RenderInformals-on-Component-With-Template-tt18053261.html#a18053261 In short this is his problem: Inf.tml http://tapestry.apache.org/sc

Grid: Composed property

2009-08-21 Thread Kai Weber
Hi, I have a Bean and want to display a combination of two fields in my Grid. public class User { String getFirstname(){...} String getLastname(){...} } I use BeanModel in my Page class and tried to find a way to do it programmatically, but failed. This way works: myModel = beanModelSource

Re: Component API?

2009-07-23 Thread Kai Weber
* Dennis Kühn : Hallo Dennis, hier deiner alter Arbeitskollege Kai. Wenn du irgendwie die Chance hast Tapestry nicht zu benutzen: benutz es nicht! Es ist ein graus. Es will alles machen und macht alles anders als alle anderen. Besser wird es dadurch nicht. Details gerne mal privat. Ich kann nur ab

Dynamic templates

2009-07-21 Thread Kai Weber
Hello Tapestriers: I have a template.tml with should look something like this http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> ${content} ${content} should be filled from properties/file/database whatever. My problem: it can contain links to other pages in my application. In the e

Re: ActionLink in bundle message

2009-07-09 Thread Kai Weber
Thiago H. de Paula Figueiredo wrote: > On Tue, Jul 7, 2009 at 12:15 PM, shymon wrote: > >> I have message with parameter which I replace using messages.format method. >> I also create link object with createEventLink() and element using Element >> class. >> It almost works, but link created this

Re: Using tapestry-acegi's LogoutService

2009-07-02 Thread Kai Weber
Juan E. Maya schrieb: Kai i am not sure how to do it with Tapestry-acegi but this use case is already supported by Spring Security: http://static.springsource.org/spring-security/site/docs/2.0.x/reference/ns-config.html#ns-concurrent-session Is it possible to use spring-security together with

Using tapestry-acegi's LogoutService

2009-07-02 Thread Kai Weber
Hi: how would I do this: Everytime a new authentication attempt is made logout the current user. What I tried to inject the LogoutService into my custom AuthenticationProcessingFilter, but I can not call logoutService.logout() because no RequestGlobals is injected into the LogoutService.

Architecture: how much logic should a component contain

2009-06-24 Thread Kai Weber
Hi, what do you think, how much of logic a component should contain? Say I have a service which retrieves values from somewhere. Should I make this service available in the component or the page containing the component and setting the values via a @Parameter variable in the component. At th

Best practice for CSS styling components

2009-06-22 Thread Kai Weber
Hi, I am searching for a good way to style my components. How would I do that? I found that adding the CSS directly to the component class (with @IncludeStylesheet) makes page specific changes to a component hard due the loading order of the stylesheets (page's css comes before the component'

Best practice unit testing pages and components

2009-06-22 Thread Kai Weber
How would I test a page or a component when a @Parameter is not accessible because of its need to be a private variable? I want to test my pages and components with unit tests as I do with my service classes. Regards, Kai -

Difference between prop: and ${...} in PageLink

2009-06-11 Thread Kai Weber
Hi, I am a Tapestry beginner. I am far from knowing all the internals. I use the PageLink component in one of my as follows: @Component(id="backLink", parameters={ "page=${backLink}", "context=backLinkContext", "anchor=${prev.getUniqueIdentifier()}"}) private PageLink backLink; My quest

Serving assets from another domain

2009-06-05 Thread Kai Weber
Hello List: I want to serve my assets (images, stylesheets, and JavaScript libraries) from another domain name to enhance the performance of my site. This is one of the recommended practices for enhanced speed from YSlow and Google's new Page Speed. For example the configuration @Inject @Pa

Re: SymbolConstant.SCRIPTS_AT_TOP=false does not work anymore

2009-04-30 Thread Kai Weber
Am 30.04.2009 16:08, schrieb Peter Stavrinides: see this page: http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/SymbolConstants.html#SCRIPTS_AT_TOP SCRIPTS_AT_TOP Deprecated. since 5.1.0.1; scripts are now always at the top (see TAP5-544) Oh no. What can I do to g

Re: SymbolConstant.SCRIPTS_AT_TOP=false does not work anymore

2009-04-30 Thread Kai Weber
Am 30.04.2009 15:26, schrieb Peter Stavrinides: What version of Tapestry? Correct me if I am wrong but from 5.1.0.4 it is no longer required. Could you tell me more, what "it is no longer required" means? Scripts are always placed on bottom of the page? Regards, Kai -

SymbolConstant.SCRIPTS_AT_TOP=false does not work anymore

2009-04-30 Thread Kai Weber
Hi, I use 5.0.18 and I cannot get SymbolConstant.SCRIPTS_AT_TOP=false to work. What I found in the sources and by running my app with a debugger: * TapestryModule sets SymbolConstant.SCRIPTS_AT_TOP to "false" in contributeFactoryDefaults() * in TapestryModule.contributeMarkupRenderer()the Sy