Re: Reg: Grid DataSources

2014-03-18 Thread Thiago H de Paula Figueiredo
On Tue, 18 Mar 2014 08:05:51 -0300, srikaanth wrote: I have to join two table with different column name in it. eg: table_A ( id, name,age) table_B ( id,sex,ph) my need is this i have to show in grid like (name,age,sex,ph) in a single grid or table . The join itself is a Hibernate thi

Re: Reg: Grid DataSources

2014-03-18 Thread srikaanth
I have to join two table with different column name in it. eg: table_A ( id, name,age) table_B ( id,sex,ph) my need is this i have to show in grid like (name,age,sex,ph) in a single grid or table . Am working on a tapestry project. Am using grid to show table using hibernate. I was able to

Re: Reg: Grid DataSources

2014-03-18 Thread Thiago H de Paula Figueiredo
On Tue, 18 Mar 2014 02:50:36 -0300, Andreas Ernst wrote: The easiest way is to create a entity class from a sql view. Or you can try this: http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects Please do *not* use that (the code in that page). The approach is very bad and I expl

Re: Reg: Grid DataSources

2014-03-18 Thread Thiago H de Paula Figueiredo
On Tue, 18 Mar 2014 01:39:28 -0300, srikaanth wrote: Hi all, Hi! Am working on a tapestry project. Am using grid to show table using hibernate. I was able to show single table structure . But here i need to join two table and show it in single table . Am using tapestry 5.3. Is there

Re: Reg: Grid DataSources

2014-03-18 Thread srikaanth
Hi Lance, Thanks for the info i will work out as per your methods and let u know. This methods explain me a lot. Keep going your good work. Reg Srikaanth .k On Tuesday 18 March 2014 01:10 PM, Lance Java wrote: Another, possibly much simpler, approach is to wrap the Hiberna

Re: Reg: Grid DataSources

2014-03-18 Thread Lance Java
Another, possibly much simpler, approach is to wrap the HibernateGridDataSource in a ConverterGridDataSource The ConverterGridDataSource will take a GridDataSource and a Converter in it's constructor and it will delegate through to another GridDataSource, converting each row to a bean as it goes.

Re: Reg: Grid DataSources

2014-03-18 Thread Lance Java
In hibernate, the HQL query "from Entity1 join Entity2" will return List with Object[0] being Entity1 and Object[2] being Entity2. You could use a custom BeanModel and PropertyConduits to look up properties from the Object[] array. See the demo here which uses a custom BeanModel and PropertyCondu

Re: Reg: Grid DataSources

2014-03-17 Thread Andreas Ernst
Am 18.03.14 05:39, schrieb srikaanth: Hi all, Am working on a tapestry project. Am using grid to show table using hibernate. I was able to show single table structure . But here i need to join two table and show it in single table . Am using tapestry 5.3. Is there any way to do or any addon aval

Reg: Grid DataSources

2014-03-17 Thread srikaanth
Hi all, Am working on a tapestry project. Am using grid to show table using hibernate. I was able to show single table structure . But here i need to join two table and show it in single table . Am using tapestry 5.3. Is there any way to do or any addon avaliable or i need to created a new st