RE: Resolving PersistentClass instances mapping to the same entity

2013-06-17 Thread Nomen Nomanum
I would like to have on @PageActivationContext to return name() instead of id(). That's the only reason for my ValueEncoder service. Do you happen to know some other workaround this issue? > Date: Mon, 17 Jun 2013 23:01:25 -0300 > Subject: Re: Resolving PersistentClass instances mapping to the

Re: Resolving PersistentClass instances mapping to the same entity

2013-06-17 Thread Thiago H. de Paula Figueiredo
As the exception says, both HibernateModule.contributeValueEncoderSource() and AppModule.contributeValueEncoderSource() are contributing a ValueEncoder for a given type and that's forbidden. Do you really need to provide your own ValueEncoders? Doesn't the Tapestry-Hibernate provided ones suit your

Resolving PersistentClass instances mapping to the same entity

2013-06-17 Thread Nomen Nomanum
Hi. :) I have following case: Article - - - - Fruits Vegetables Fruits and Vegetables inherits Article, and both Fruits and Vegetables have same DiscriminatorValue. Now when I try to do some ValueEncoder magic like in following public class Ar

Re: Sessions getting mixed up

2013-06-17 Thread Howard Lewis Ship
That's the PerThread scope. Tapestry IoC was designed to do minimal intrusion into your code; until 5.2, it didn't do field injection, just constructor injection. The problem with saying "@SessionScope is not supported" is that, if you iterate over all the fields and all the annotation, how do yo

RE: PageURL rewriting deprecated

2013-06-17 Thread Nomen Nomanum
Also, I plead You to explain me in text of course( not by source code ), if You can step by step how to change following: localhost:8080/MyApp/MyPage1/1 to just localhost:8080/MyApp/1 How to delete MyPage1 context from link url and to leave only localhost:8080/MyApp/1

RE: PageURL rewriting deprecated

2013-06-17 Thread Nomen Nomanum
You are master, master of knowledge, giving help thousands of people here who strive for it, so don't be modest. Your words expose to us new light how things function in a best possible way. For instance, without you I nor my fellows wouldn't know this: This first level (the context/webapp nam

Re: Sessions getting mixed up

2013-06-17 Thread mailingl...@j-b-s.de
Maybe I do net get it, but why can't you make use of a service having "Request Scope"? So Tapestry creates a new Instance per Request and you attach / inject yor session here? Jens Sent from my iPhone On 17.06.2013, at 15:50, Michael Gentry wrote: > Could Tapestry throw an exception if you u

Re: DefaultTreeModel doesnt user encoder to get the node

2013-06-17 Thread Boris Horvat
Well it is true that encoder cant return Node but the value inside it. However that can easily be transformed into a node as I have done. So I guess then there will be no plans to change this behaviour in the future? On Mon, Jun 17, 2013 at 2:24 PM, Lance Java wrote: > There is no connection to

Re: PageURL rewriting deprecated

2013-06-17 Thread Thiago H. de Paula Figueiredo
On Mon, Jun 17, 2013 at 3:15 PM, Nomen Nomanum wrote: > Hi, @Thiago! :) > Hi! > Yes, you are right, I have no idea what am I doing. But with a help from > master, I hope I will. My scenario is following: > Hey, I'm no master, just someone with a love for posting in mailing lists . . . > I ha

RE: PageURL rewriting deprecated

2013-06-17 Thread Nomen Nomanum
Hi, @Thiago! :) Yes, you are right, I have no idea what am I doing. But with a help from master, I hope I will. My scenario is following: I have something as following: localhost:8083/MyApp/MyPage now I want to be something like localhost:8083/MyPage So, I have renamed my war file to ROOT file, an

Re: PageURL rewriting deprecated

2013-06-17 Thread Thiago H. de Paula Figueiredo
Hi, Nomen! I didn't understand what you're trying to do nor you said what do you mean by "it won't work". Do you want to rewrite incoming URLs (i.e. the ones received by Tapestry) or outgoing ones (i.e. the ones generated by Tapestry)? Anyway, your logic seems wrong, indicating you don't know yet

Re: Sessions getting mixed up

2013-06-17 Thread Thiago H. de Paula Figueiredo
No. Services are handled by Tapestry-IoC and @SessionState isn't part of it. In other words, we would need to create a dependency of Tapestry-IoC on Tapestry(-core, the web framework), something that doesn't happen today. On Mon, Jun 17, 2013 at 10:50 AM, Michael Gentry wrote: > Could Tapestry t

RE: PageURL rewriting deprecated

2013-06-17 Thread Nomen Nomanum
Your module is great, @Thiago, however it seems to me I can't setup the following scenario: Substring everything before second /, ie localhost:8080/X/Y/Z/ where X stands for app name. I have tried the following, but it won't work. URLRewriterRule rule1 = new URLRewriterRule() {

Re: Sessions getting mixed up

2013-06-17 Thread Michael Gentry
Could Tapestry throw an exception if you use @SessionState in a service? Thanks, mrg On Mon, Jun 17, 2013 at 9:25 AM, Thiago H. de Paula Figueiredo < thiag...@gmail.com> wrote: > On Mon, Jun 17, 2013 at 8:36 AM, Nathan Quirynen < > nat...@pensionarchitects.be> wrote: > > > Hi, > > > > Hello!

Re: Sessions getting mixed up

2013-06-17 Thread Thiago H. de Paula Figueiredo
On Mon, Jun 17, 2013 at 8:36 AM, Nathan Quirynen < nat...@pensionarchitects.be> wrote: > Hi, > Hello! > > I think the problem is that I use the @SessionState in a injected service. > And the service being a singleton, explains the behaviour. I guess > @SessionState can only be used in pages an

Re: Sessions getting mixed up

2013-06-17 Thread Nathan Quirynen
I made the mistake of using @SessionState in a service, while this is only supported in pages components or mixins. So the annotation didn't do anything. So there was always just one instantiation of the object, which everyone used. I fixed my problem

Re: DefaultTreeModel doesnt user encoder to get the node

2013-06-17 Thread Lance Java
There is no connection to tapestry-stitch. I might put together a demo in the future if I get the time

Re: DefaultTreeModel doesnt user encoder to get the node

2013-06-17 Thread Willy Browne
Hi, i am not sure how to connect this to the stitch-demo you wrote before...   veillez! car nul ne sait ni l'heure ni ne jour. De : Lance Java À : Tapestry users Envoyé le : Lundi 17 juin 2013 11h49 Objet : Re: DefaultTreeModel doesnt user encoder to get the

Re: [t5.3.7] Why is tapestry reloading a service being instantiated ?

2013-06-17 Thread Muhammad Gelbana
I suspect this could have something to do with this issue: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T-5-3-Everything-annotated-with-Startup-called-twice-tt5715991.html On Thu, Jun 13, 2013 at 6:53 PM, Muhammad Gelbana wrote: > It's the initial load, the first run on the

Re: [T 5.3] Everything annotated with @Startup called twice

2013-06-17 Thread Muhammad Gelbana
Thanks a lot, this helped :) And it looks a lot like a bug ! Have you started a jira issue ? On Fri, Jun 14, 2013 at 10:53 AM, Christian Riedel wrote: > Yes, I did. > > The problem was that I contributed a service whose interface extended > "Runnable". > > See my detailed post here: > > > http:/

Re: Sessions getting mixed up

2013-06-17 Thread Nathan Quirynen
Hi, I think the problem is that I use the @SessionState in a injected service. And the service being a singleton, explains the behaviour. I guess @SessionState can only be used in pages and components? Have to test this though. On 17/06/13 13:0

Re: Sessions getting mixed up

2013-06-17 Thread Thiago H. de Paula Figueiredo
A common mistake is to initialize @Persist or @SessionState fields in its declaration (such as @Persist private User user = new User(). Don't do that. Use event handler methods for that. setupRender() is usually a good choice. On Mon, Jun 17, 2013 at 5:49 AM, Nathan Quirynen < nat...@pensionarchi

Re: Sessions getting mixed up

2013-06-17 Thread Kristian Marinkovic
can you post some code? the page with the annotated field and the methods that manipulate that fields? On Mon, Jun 17, 2013 at 10:49 AM, Nathan Quirynen < nat...@pensionarchitects.be> wrote: > Hi, > > I'm having some weird issues with sessions that are getting mixed up, for > example: > > I open

Re: DefaultTreeModel doesnt user encoder to get the node

2013-06-17 Thread Lance Java
FYI, I have always thought that the DefaultTreeModel makes it difficult to efficiently load a TreeModel from the database. If you're not careful, you will fire N+1 selects. I have created an (untested) LazyTreeModel which IMO is much easier to implement an efficient database lookup for tree nodes.

Sessions getting mixed up

2013-06-17 Thread Nathan Quirynen
Hi, I'm having some weird issues with sessions that are getting mixed up, for example: I open a page in both Firefox and Safari (so they are a different HttpSession). I do something in Firefox that sets a value in an object that is annotated with @SessionState. Apparently this change also a

Re: DefaultTreeModel doesnt user encoder to get the node

2013-06-17 Thread Lance Java
The encoder can't retrieve values of type TreeNode, it can only get values of type T. It seems that DefaultTreeModel is optimised for session persistence. If you'd prefer to load on demand, you might want to override getById() to lookup all node properties from the database