Re: Live Class Reloading

2015-03-18 Thread Adam X
Hi Felix - I also, once again, just created project and it is production mode (not reporting development next to tapestry logo in the log output). I also did a simple test by changing tapestryVersion property (Index.java) to tapestryVersionn, expecting exception but none showing upon refreshing the

Re: Live Class Reloading

2015-03-18 Thread Felix Scheffer
Hi Adam, I just created a project using the archetype and live reloading works fine without tapestry.execution-mode=development. Are you sure that you are in not in production mode? Your log should contain "5.3.7 (development mode)" next to the Tapestry logo. The CheckForUpdatesFilter should cal

TranslatorDefaultSource don't exists in Tapestry 5.4 beta 27

2015-03-18 Thread Andrea Cerfogli
I'm using Tapestry 5.4 beta 27 and I have added a DoubleTranslator in AppModule.java *public static void contributeTranslatorDefaultSource( MappedConfiguration configuration)* * {* * configuration.add(Double.class, new DoubleTranslator());* * }* *but at runtime I got an error because the clas

Re: SoftReferences to PageImpl can cause performance problems

2015-03-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Mar 2015 04:44:10 -0300, Robert Schmelzer wrote: I do not agree with you on that point. Tapestry is designed to cache the page. When you do not have enough memory to hold your pages cached basically the system does not work as designed so you should fail early. How could Tape

Re: SoftReferences to PageImpl can cause performance problems

2015-03-18 Thread Kalle Korhonen
On Wed, Mar 18, 2015 at 12:44 AM, Robert Schmelzer wrote: > I do not agree with you on that point. Tapestry is designed to cache the > page. When you do not have enough memory to hold your pages cached > basically the system does not work as designed so you should fail early. > Otherwise you pos

Re: How to use a property of render variables

2015-03-18 Thread Thiago H de Paula Figueiredo
Render variables (a.k.a the var: binding) doesn't support properties. Period. Instead, create a property in the corresponding Java class for being your loop variable. The var: binding is only supposed to be used in very specific scenarios in which the looped values are primitives, strings o

Fwd: How to use a property of render variables

2015-03-18 Thread Dominik Dorn
Hi, I couldn't find information on how to access properties of render variables. I have the following test case: Suppose we have two classes: class App { private String name; /* + getters/setters */ } class Node { private List apps; private String name; /* + getters/setters */ } in my page I

How to use a property of render variables

2015-03-18 Thread Dominik Dorn
Hi, I couldn't find information on how to access properties of render variables. I have the following test case: Suppose we have two classes: class App { private String name; /* + getters/setters */ } class Node { private List apps; private String name; /* + getters/setters */ } in my page I

Re: AW: Session Storage with Tapestry

2015-03-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Mar 2015 11:14:08 -0300, Poggenpohl, Daniel wrote: What I meant to say was they recommend @SessionState instead of @SessionAttribute because it is a complex object. Who said that? Anyway, I think it's an incorrect statement. It should say "@SessionAttribute for primitive types

Live Class Reloading

2015-03-18 Thread Adam X
Howdy, I'm returning to Tapestry after several years of inactivity and I'm attempting a new project with T5.3.7. Ran a standard tut and found out that Live Class Reloading (following the tutorial) does not work unless Eclipse RJR Run Config is amended with a JVM param: -Dtapestry.execution-mode=d

AW: Session Storage with Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hi, > You need to use @SessionState because @Persist is only valid for a given page > or component. Page1's @Persist private > User user; is stored in a different session attribute than Page2's @Persist > private User user;. If you want something > persisted across pages, you need to use @Sess

Re: Session Storage with Tapestry

2015-03-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Mar 2015 07:21:06 -0300, Poggenpohl, Daniel wrote: Hello again, Hi! I need a session storage where I store the currently logged on user. Reading about it in the documentation, they recommend using @SessionState because my user is a complex object, also containing lists of

AW: AW: Memory Footprint in Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hi, some interesting and insightful information here. Thank you for that! Regards, Daniel P. -Ursprüngliche Nachricht- Von: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] Gesendet: Mittwoch, 18. März 2015 14:07 An: Tapestry users Betreff: Re: AW: Memory Footprint in Tapestry

AW: Memory Footprint in Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hi, yes, I've read http://tapestry.apache.org/persistent-page-data.html. I just couldn't wrap my head around it before because I always thought storing data between requests automatically meant storing it in a client-side cookie or something like that. This has been cleared up, thank you for th

Re: AW: Memory Footprint in Tapestry

2015-03-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Mar 2015 07:32:43 -0300, Poggenpohl, Daniel wrote: Hello, Hi! from what I gather, Tapestry intercepts requests and looks for the according page instances in the server-side application. Correct, as Tapestry is implemented as a servlet filter, not a servlet, so "interceptin

Re: Memory Footprint in Tapestry

2015-03-18 Thread Thiago H de Paula Figueiredo
On Wed, 18 Mar 2015 05:21:51 -0300, Poggenpohl, Daniel wrote: Hello, Hi! Have you seen http://tapestry.apache.org/persistent-page-data.html? For example, I have a page and database entities used in the page. What is the difference in using @Persist for these entities? If I don't use @

Re: Session Storage with Tapestry

2015-03-18 Thread Barry Books
For this to work you need to store an entity in the SessionState. It looks like you are storing AppSession in the SessionState which contains the User entity. The simple way to fix this would be to add a lastLogin property to your User entity and then just make your SessionState a User object. If y

AW: Session Storage with Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hello again, oops, I didn't see this message, sorry. This here: http://tapestry.apache.org/5.3/apidocs/src-html/org/apache/tapestry5/jpa/JpaModule.html seems to indicate that the default for JpaSymbols.ENTITY_SESSION_STATE_PERSISTENCE_STRATEGY_ENABLED is "true", which is part of why my changes do

AW: Session Storage with Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hi, I've read about the Hibernate entity persistence strategy on http://tapestry.apache.org/hibernate-user-guide.html As I do not want to be Hibernate-specific, I searched for an equivalent for JPA and found it not in the guide, but searching in Eclipse: JpaSymbols.ENTITY_SESSION_STATE_PERSISTENC

Re: Session Storage with Tapestry

2015-03-18 Thread Barry Books
If you are using Tapestry Hibernate it should just work if you put a Hibernate object into a SessionState variable. There is a configuration that contains the Hibernate entities so SessionState is able to store the primary key in the session and retrieve the object when needed. Services as well as

AW: Memory Footprint in Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hello, from what I gather, Tapestry intercepts requests and looks for the according page instances in the server-side application. The session id, if present, is transmitted with the request, so the appropriate page instance is used that maybe has some session-@Persist'ed members. Java code is

Session Storage with Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hello again, a slightly different topic as the last but with the same "undertones": I need a session storage where I store the currently logged on user. Reading about it in the documentation, they recommend using @SessionState because my user is a complex object, also containing lists of other

Re: Unable to locate a single EntityManager. You must provide the persistence unit name as defined in the persistence.xml using the @PersistenceContext annotation.

2015-03-18 Thread Andreas Ernst
Hi Felix, yes, you are right i use two persitence units. And it works now. Thanks! Andreas Am 18.03.15 um 05:23 schrieb Felix Scheffer: Hi Andreas, I assume you have more than one persistence context. In this case you have to add the @PersistenceContext annotation to your onSuccess() method.

Re: Memory Footprint in Tapestry

2015-03-18 Thread Geoff Callender
Here's a starting point for understanding @Persist: T5.4: http://jumpstart.doublenegative.com.au/jumpstart7/examples/state/storingdataina T5.3: http://jumpstart.doublenegative.com.au/jumpstart/examples/state/storingdatainapage Geoff On 18 Mar 2015, at 7:21 pm, Poggenpohl, Danie

Memory Footprint in Tapestry

2015-03-18 Thread Poggenpohl, Daniel
Hello, I've yet to really understand which decisions for my Page and Component classes regarding member variables lead to what amount of increase in memory usage or bandwidth usage. Are there any documentation pages that I've maybe overlooked? For example, I have a page and database entities us

Re: SoftReferences to PageImpl can cause performance problems

2015-03-18 Thread Robert Schmelzer
I do not agree with you on that point. Tapestry is designed to cache the page. When you do not have enough memory to hold your pages cached basically the system does not work as designed so you should fail early. Otherwise you possible defer the problem to production use. Fail early means you

Re: SoftReferences to PageImpl can cause performance problems

2015-03-18 Thread Robert Schmelzer
A time or LRU algorithm is not really a good thing here even when I use a page just once a day, I do not want to have it initialzed on the fly. You might run into problems with holding you SLA. In my opinion Tapestry is designed to Cache the pages. If it cannot do so - it must throw an error a