RE: Creating Grid component at runtime

2010-09-26 Thread Jim O'Callaghan
Re-reading your email Kamath I can see you have already been advised on this
approach.  Perhaps if the non-primitive properties used for the display
class were only initialised to a value by their setters the memory issue
would be not relevant, and you would already have the names of the
properties for the include/exclude parameter of the grid by taking them from
the query.

Regards,
Jim.

-Original Message-
From: Jim O'Callaghan [mailto:jc1000...@yahoo.co.uk] 
Sent: 26 September 2010 15:55
To: 'Tapestry users'
Subject: RE: Creating Grid component at runtime

Can you use a helper class that contains getters for all the possible fields
you require, and them dynamically build a comman delimited "include" (or
"exclude") string, that you pass to your grid using include/exclude via a
page property?

Regards,
Jim.

-Original Message-
From: kamath_svk [mailto:kamath...@yahoo.co.in] 
Sent: 26 September 2010 15:40
To: users@tapestry.apache.org
Subject: Re: Creating Grid component at runtime


As advised in the previous reply, i can create a class which contains all
the
column & display only those column names which are present in the query.
But i think that will be waste of memory since, I have 50 column names from
col1,col2,.. col50.
Consider the situation where only one column is select by query, the object
created will use the storage for all 50 columns where as only 1 is actually
useful.

so i wanted to know, if i can use beanmodel to add the columns dynamically
at runtime.
-- 
View this message in context:
http://tapestry.1045711.n5.nabble.com/Creating-Grid-component-at-runtime-tp2
847820p2854386.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: Creating Grid component at runtime

2010-09-26 Thread Jim O'Callaghan
Can you use a helper class that contains getters for all the possible fields
you require, and them dynamically build a comman delimited "include" (or
"exclude") string, that you pass to your grid using include/exclude via a
page property?

Regards,
Jim.

-Original Message-
From: kamath_svk [mailto:kamath...@yahoo.co.in] 
Sent: 26 September 2010 15:40
To: users@tapestry.apache.org
Subject: Re: Creating Grid component at runtime


As advised in the previous reply, i can create a class which contains all
the
column & display only those column names which are present in the query.
But i think that will be waste of memory since, I have 50 column names from
col1,col2,.. col50.
Consider the situation where only one column is select by query, the object
created will use the storage for all 50 columns where as only 1 is actually
useful.

so i wanted to know, if i can use beanmodel to add the columns dynamically
at runtime.
-- 
View this message in context:
http://tapestry.1045711.n5.nabble.com/Creating-Grid-component-at-runtime-tp2
847820p2854386.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Creating Grid component at runtime

2010-09-26 Thread kamath_svk

As advised in the previous reply, i can create a class which contains all the
column & display only those column names which are present in the query.
But i think that will be waste of memory since, I have 50 column names from
col1,col2,.. col50.
Consider the situation where only one column is select by query, the object
created will use the storage for all 50 columns where as only 1 is actually
useful.

so i wanted to know, if i can use beanmodel to add the columns dynamically
at runtime.
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Creating-Grid-component-at-runtime-tp2847820p2854386.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Creating Grid component at runtime

2010-09-22 Thread Thiago H. de Paula Figueiredo
On Tue, 21 Sep 2010 07:22:03 -0300, kamath_svk   
wrote:


2.   I need to Use Grid component. As far as I know each row of grid  
is stored as objects & grid uses getters to retrieve the values.


Ex. Assume a table named TableA consists of Col1, Col2, Col3, Col4, Col5,
Col6, Col7, Col8, Col9 and Col10. Using query, I select say 4 columns  
(Col1,

Col5, Col7 and Col8)


Create a class that represents lines from this query. That's the easiest,  
cleanest solution. Using raw data from the database in the view layer is  
not recommended at all.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org