Re: Grid Pagination and Performance

2013-11-13 Thread Lance Java
The Grid should only ever send a single page of data at a time. Let's get things clear... Are you using @Persist or java.util.List with your large dataset? To maintain scalability you should never coerce GridDataSource to List. Perhaps it's just your choice of language (persist & list) that was

Re: zone containing a scrollable element

2013-11-13 Thread Chris Mylonas
Hi John, I had a similar update zone problem with the tree element, but because of my left hand tree, right hand update got around it by vertical-align in css for the tree side. If you are using jquery, the scrollTop might help. http://stackoverflow.com/questions/14886038/get-scroll-position-usin

Re: Grid Pagination and Performance

2013-11-13 Thread Thai Tran
Thank all for your answers. What I am really confused is the official document does not say anything about the performance, while I can see clearly that in my persisted list, there is 10k objects transferred back and forth between client and server even the rowsPerPage is set to 20. I think there s

zone containing a scrollable element

2013-11-13 Thread John
I have a zone that contains a scrollable div with a long list of links inside it. After the users scrolls down the list and picks one of the actionlinks at the bottom, the zone refresh moves the view back to the top so the user can't see what they picked. Is there a way to ensure that the scrol

Re: Grid Pagination and Performance

2013-11-13 Thread Lance Java
The grid needs the rowcount to know how many pages there are in total (eg page 1 of N). HibernateGridDataSource and JpaGridDataSource execute 2 types of queries. 1 to get the rowcount and another to get a single page at a time. In my opinion this is a scalable approach.

Re: Service Injection in @EntityListeners class

2013-11-13 Thread Kalle Korhonen
Injectable listeners is only available in JPA 2.1. There was a thread earlier (started by me) on this. I want to carve out some time at some point to make it possible in Tapestry-ioc. If you are using EclipseLink and don't mind an ugly provider-specific hack, you could get some ideas from http://sv

Re: Service Injection in @EntityListeners class

2013-11-13 Thread Thiago H de Paula Figueiredo
On Wed, 13 Nov 2013 11:46:54 -0200, Eugen wrote: Hi Thiago, Hi! thanks for the quick reply how to manage the instantiation of listener classes? That's JPA stuff and I don't know the answer, unfortunately. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and develo

Re: Service Injection in @EntityListeners class

2013-11-13 Thread Eugen
Hi Thiago, thanks for the quick reply how to manage the instantiation of listener classes? I'm contributing now the EntityManagerSource with custom PersistenceUnitConfigurer (to avoid XML configuration) and tried to add a ClassTransformer instance, but it is never called. 2013/11/13 Thiago H de Pa

Re: Service Injection in @EntityListeners class

2013-11-13 Thread Thiago H de Paula Figueiredo
On Wed, 13 Nov 2013 08:38:05 -0200, Eugen wrote: Hi, Hi! it is possible to user service injections inside a @EntityListeners annotated class? If you manage to get it instantiated through Tapestry-IoC, yes. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and devel

Re: Grid Pagination and Performance

2013-11-13 Thread Muhammad Gelbana
@Thai, you can implement your own GridSource for better performance. Check this threadfor help. *-* *Muhammad Gelbana* http://www.linke

Service Injection in @EntityListeners class

2013-11-13 Thread Eugen
Hi, it is possible to user service injections inside a @EntityListeners annotated class? I've tried to put the class in app.base, app.entites and app.service packages, but the injected field is always null. My code looks like: public class EntityJpaListener { @Inject private SomeService

Re: Grid Pagination and Performance

2013-11-13 Thread Antal van Kalleveen
Hi, You are correct that the current provided implementations of the GridDataSource (HibernateGridDataSource and JpaGridDataSource) will query for the total number of rows in the database and therefor can kill performance on the client side as well as on the DB side. Particulary if sorting and