Re: Keeping the session alive pattern?

2013-02-08 Thread Lance Java
I had no idea he was already using tapestry-security until you mentioned it. I thought my comments were clear that the security frameworks have solved this problem, I guess I was not. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Keeping-the-session-alive-pattern-tp571

How to call locale properties file based on urls

2013-02-08 Thread karthi
Hi everyone, I am developing a web application in tapestry & now I want to call locale properties file & this properties file call should depends on the calling url. Eg., My app name is Club & I have properties file under my WEB-INF folder as Club_en.properties Club_de.properties Club_it.prope

Re: Tapestry-5.4-alpha-2 css overriding

2013-02-08 Thread Lance Java
Note that @Import does not need to be used at the class level. You can specify @Import on one of the later render phases, eg: afterRender() -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-5-4-alpha-2-css-overriding-tp5719856p5719863.html Sent from the Tapestry -

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry has built in support for including the language in the URL. If you set the locale on the PersistentLocale service, the first folder in the URL will be the language http://tapestry.apache.org/localization.html There is also a ThreadLocale service which is ultimately used for message lookup

Re: How to call locale properties file based on urls

2013-02-08 Thread karthi
Thanks for your reply. the first folder in the URL will be the language? Here, Can't understand? could you elaborate? If my called url is de.club.mobi/club then will my club_de.properties invoke automatically? -- View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-cal

Re: How to call locale properties file based on urls

2013-02-08 Thread karthi
One more question: You said: If you set the locale on the PersistentLocale service How to set PersistentLocale service? I just tried to inject in my page but it doesn't gives any effect rather it throws null pointer exception. -- View this message in context: http://tapestry.1045711.n5.nabbl

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Tapestry's built in language support is as follows www.myserver.com/Clubs - persistant locale is null www.myserver.com/de/Clubs - persistant locale is "de" If you are happy enough with that then use the built in support. If not, use my second suggestion. -- View this message in context: http

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
All of the services I mentioned (PersistantLocale, ThreadLocale, Request and RequestHandler) are tapestry managed services. I suggest you familiarize yourself with tapestry IOC http://tapestry.apache.org/defining-tapestry-ioc-services.html http://tapestry.apache.org/tapestry-ioc-configuration.html

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
Hi karthi and Lance Java, @karthi, if you try the second solution and it doesn't work as expected, try it with ComponentRequestFilter instead of RequestFilter. I had there a tricky problem this week, see here: https://mail-archives.apache.org/mod_mbox/tapestry-users/201302.mbox/%3c51123b7f.20...@g

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
René, tapestry also supports locale specific assets (eg images) so a ComponentRequestFilter is too late in the request-processing pipeline (http://tapestry.apache.org/request-processing.html). I think your main problem is that you have contributed your localeFilter "after:*" so it won't run until

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. But it didn't work. I've tried now again and set the things you said before. By the way, thanks for the tips

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
> I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. I've never heard of filters named "SetupRender" or "BeginRender" so I'm pretty sure "before:SetupRender" ha

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
René, I think I've figured out what your problem is. You should not be using LocalizationSetter as this is backed by the PersistantLocale which is ultimately responsible for including the language as the first folder in the URL. As I said initially, if you want your own custom logic (ie storing in

Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
Hello! I have objects (Messages) and each message may have some "attributes" associated with. Each attribute is part of one attribute family. Example: Attribute-Family Age has the attributes young, adult, old. Attribute-Family Relation has the attributes single, couple, family. Both the Att

Re: How to call locale properties file based on urls

2013-02-08 Thread René Bernhardsgrütter
> I've never heard of filters named "SetupRender" or "BeginRender" so I'm > pretty sure "before:SetupRender" has no effect I just tried this while I was trying to get it work. > Interfaces are very necessary!!!. They are crucial to tapestry to support > lazy loading etc. You should NEVER refer to

Re: How to call locale properties file based on urls

2013-02-08 Thread Taha Siddiqi
Hi Is this something you are looking for http://tawus.wordpress.com/2013/01/07/changing-locale-based-on-domain/ regards Taha On Feb 8, 2013, at 7:09 PM, René Bernhardsgrütter wrote: >> I've never heard of filters named "SetupRender" or "BeginRender" so I'm >> pretty sure "before:SetupRender"

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 11:37:09 -0200, sommeralex wrote: Hello! Hi! The short answer to the question in the submect is this: OptionModel and SelectModel are interfaces. Create an implementation that does what you need. -- Thiago H. de Paula Figueiredo --

Re: How to call locale properties file based on urls

2013-02-08 Thread Lance Java
Hi Taha, decorating the ComponentEventLinkEncoder should have the same effect as contributing a ComponentRequestFilter. As I've mentioned in this thread, tapestry also supports locale specific assets (images, stylesheets etc) so I feel that a RequestFilter is the correct point of interception for t

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
I've overlooked the questions in the end . . . On Fri, 08 Feb 2013 11:37:09 -0200, sommeralex wrote: *Q1* Contributing value encoders to app module wont help, due to the reason that the value encoders are not really dynamic in my case (e.g. if iam creating a new attribute-family, i woul

Re: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 10:17:57 -0200, René Bernhardsgrütter wrote: I also contributed the RequestFilter in different phases ("before:*", "before:SetupRender", "before:BeginRender") because, to me, this should set the locale before any template is rendered. SetupRender and BeginRender are comp

Re: How to call locale properties file based on urls

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 11:39:13 -0200, René Bernhardsgrütter wrote: Interfaces are very necessary!!!. They are crucial to tapestry to support lazy loading etc. You should NEVER refer to your services by their concrete type. This isn't just for Tapestry-IoC or Tapestry or even Java: these ar

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Lance Java
I have my own ListSelectModel for this purpose. Then, for any entity I want to use in a select menu, all I need to write is a LabelProvider. public interface LabelProvider { String getLabel(T value); } public class ListSelectModel extends AbstractSelectModel { private List options; publ

Re: Tapestry-5.4-alpha-2 css overriding

2013-02-08 Thread Matías Blasi
Thanks guys, but I tried both with no success. My custom.css is loaded first in any case Is there any change on this in 5.4-alpha-2? I am used to override default.css definitions with a custom.css in 5.3.x through @Import with no problem. Regards, Matías. Saludos, Matias. On Thu, Feb 7, 20

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
Hi Thiago, Thanx for the detailed answers! And sorry for being not clear. Sure, value, option and selectModel are different, i just mixed them into "one thing" in my questions. For getting the list-items to select, i need a selectModel. This selectModel consists of optionModels, the optionModel

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
also thanx! -- View this message in context: http://tapestry.1045711.n5.nabble.com/Dynamic-OptionModel-Implementation-How-To-tp5719875p5719886.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubsc

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 13:27:26 -0200, sommeralex wrote: Hi Thiago, Hi! Thanx for the detailed answers! And sorry for being not clear. Sure, value, option and selectModel are different, i just mixed them into "one thing" in my questions. They are very different things, so you shouldn't

Re: Tapestry > 5.3 makes it impossible to load symbols from DB (TAP5-1823)

2013-02-08 Thread derkoe
Lance Java wrote > As suggested in the Jira, your SettingsService could @Inject ObjectLocator > instead of the hibernate session. It could then lazily call > ObjectLocator.getService(Session.class) to get the hibernate session. This doesn't work since a method is invoked on the SettingsService in

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Feb 2013 14:19:06 -0200, sommeralex wrote: Thank you again for your answer. I guess my confusion with tapestry is that it does so many things (which I would never expect it to do but I am happy with) one the one hand. On the other hand, other things - for sure - have to be im

Re: Dynamic OptionModel Implementation: How To?

2013-02-08 Thread sommeralex
thx Am 08.02.2013 um 18:05 schrieb "Thiago H de Paula Figueiredo [via Tapestry]" : > On Fri, 08 Feb 2013 14:19:06 -0200, sommeralex > <[hidden email]> wrote: > > > Thank you again for your answer. I guess my confusion with tapestry is > > that it does so many things (which I would never

Re: Tapestry 3.0.4 JDK 7 compatibility

2013-02-08 Thread Muhammad Gelbana
I suppose this question should be directed to Java developers, not Tapestry's. And It's really sad to see some entity not willing to upgrade to T5. It's a whole another phase, you should REALLY keep on trying to convince your manager to upgrade to T5. On Fri, Feb 8, 2013 at 12:00 AM, Thiago H de P

Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
I've been running in circles trying to make Eclipse and Maven happy with the dependencies, but I've had no luck. My final play was to download Jumpstart 6.6.5 and run the build, then upload tapestry5-jquery-3.3.4.jar and tapestry-bootstrap-2.1.3.jar to my artifact repository. I then ad those to m

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Chris Cureau
Tapestry-bootstrap needs tapestry 5.3.4. I just cloned the tapestry-bootstrap git repository and changed the dependency to 5.3.6. If there's a better way, please let me know! On Feb 8, 2013 8:12 PM, "George Ludwig" wrote: > I've been running in circles trying to make Eclipse and Maven happy wit

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
This is really a maven question. Just put an exclusion in your bootstrap dependency and then add your own tapestry dependency. This way you control what versions you get. On Feb 8, 2013, at 9:12 PM, George Ludwig wrote: > I've been running in circles trying to make Eclipse and Maven happy with >

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent difference. Also, the maven error tells me that the missing dependency is bootstrap-2.1.3->tapestry-yuicompressor-5.3.4->...yahoo.platform.yuicompressor-2.4.7 Looking at jumpstart 6.6.5, it is happily using tapestry 5.3.6, I d

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
Maven exclusion is the key thing. Use Google for more details. On Feb 8, 2013, at 10:19 PM, George Ludwig wrote: > @Chris: I tried downgrading to tapestry 5.3.4, and it made no apparent > difference. > > Also, the maven error tells me that the missing dependency is > bootstrap-2.1.3->tapestry-y

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I get the maven exclusion, but what exactly should I exclude? Is it safe to exclude tapestry-yuicompressor on version 5.3.6? On Fri, Feb 8, 2013 at 7:21 PM, Lenny Primak wrote: > Maven exclusion is the key thing. Use Google for more details. > > On Feb 8, 2013, at 10:19 PM, George Ludw

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
Yes. Exactly right. Find out what includes it via mvn dependency:tree and add exclusions for every one of them. On Feb 8, 2013, at 10:23 PM, George Ludwig wrote: > @Lenny: I get the maven exclusion, but what exactly should I exclude? Is it > safe to exclude tapestry-yuicompressor on version 5

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: I excluded tapestry-yuicompressor, and maven is happy, but I can't help but wonder if something is actually going to need that compressor! On Fri, Feb 8, 2013 at 7:25 PM, Lenny Primak wrote: > Yes. Exactly right. Find out what includes it via mvn dependency:tree and > add exclusions fo

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread Lenny Primak
It's optional. If you aren't using it and its causing you problems don't worry about it. there are tons of issues with it. You can google past discussions about how to make it work if you really need of. I suspect you don't. On Feb 8, 2013, at 10:27 PM, George Ludwig wrote: > @Lenny: I exclud

Re: Trying to get tapestry-bootstrap running with 5.3.6

2013-02-08 Thread George Ludwig
@Lenny: so running my app with the bootstrap stuff in it, the first thing I notice is that none of my onProgressiveDisplay events are getting triggered, and I have no idea if this is related to the yuicompressor, or if it's something else. That's what I hate about workaround...the throw way to muc