No, thats not what I meant. Sorry, if I wasnt clear
enough. 

What I meant was:
I execute a sql query, it could return any number of
columns and they could be anything from multiple
tables. So the result of the sql query is not
predictable. And so I cannot create POJO classes with
getters/setters for the result that will be returned.
So I have a list with the results I want to display
but no getters/setters for the properties. But at
runtime, I do have the property names I want to
display. 

For eg:
In my .jsp page I write something like
<display:table name="test">
   <display:column property="id" title="ID" />
   <display:column property="name" />
</display:table>
But I do not have getters for id and name, will it
work?

Obviously the best thing is to test it out. I was busy
doing other stuff for the project, so I thought I will
atleast put my question out there in case display tag
doesnt work in this situation and anybody knows a
solution to it, a solution other than creating a
dynamic object with the getters.

Thanks for your help.

Neha.

--- "Gupta, Karan" <[EMAIL PROTECTED]> wrote:

> So right now you have getter/setter for, say name
> and email fields but not for the rest?
> If you can generate getters/setters for all the
> fields, then you can keep a simple data structure
> which tells you whether a particular column is
> included in the query or not (like an array of
> boolean values, where each cell represents a
> column's visual state). Then in ur View, you can
> check the value of each cell in this array before
> <display:column ......> and either include the
> column in ur table, or not.
> 
> HTHs,
> Karan
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]
> Behalf Of Neha
> Kansal
> Sent: Wednesday, November 02, 2005 4:21 PM
> To: [email protected]
> Subject: Re: [displaytag-user] Using displaytag for
> column properties
> without getter/setter methods.
> 
> 
> To clarify the issue further, I will have a list of
> column names that will be displayed when I display
> them, but the Database query could return anything
> and
> so I cannot define getters/setters. So basically I
> could have something like
> 
> <display:table name="test">
>   <display:column property="id" title="ID" />
>   <display:column property="name" />
>   <display:column property="email" />
>   <display:column property="status" />
>   <display:column property="description"
> title="Comments"/>
> </display:table>
> 
> BUT I do not have getters for all those properties.
> Is
> there a way to handle that in displaytag. 
> 
> Thanks a lot.
> 
> Neha.
> 
> --- Neha Kansal <[EMAIL PROTECTED]> wrote:
> 
> > Hi
> > 
> > I have a list that is created dynamically based on
> > the
> > database query being issued. And so I do not know
> > beforehand that what columns will be returned. I
> > want
> > to display this list using displaytag.
> > 
> > Is it possible to use DisplayTag for such a list,
> > the
> > objects of which do not have getter/setter methods
> > defined for the fields to be displayed? 
> > 
> > Any help would be appreciated. Thanks.
> > 
> > Neha.
> > 
> >  
> > 
> > 
> >     
> >             
> > __________________________________ 
> > Yahoo! Mail - PC Magazine Editors' Choice 2005 
> > http://mail.yahoo.com
> > 
> > 
> >
>
-------------------------------------------------------
> > SF.Net email is sponsored by:
> > Tame your development challenges with Apache's
> > Geronimo App Server. Download
> > it for free - -and be entered to win a 42" plasma
> tv
> > or your very own
> > Sony(tm)PSP.  Click here to play:
> > http://sourceforge.net/geronimo.php
> > _______________________________________________
> > displaytag-user mailing list
> > [email protected]
> >
>
https://lists.sourceforge.net/lists/listinfo/displaytag-user
> > 
> 
> 
> 
>       
>               
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> 
>
-------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's
> Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv
> or your very own
> Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> _______________________________________________
> displaytag-user mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 
> 
>
-------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's
> Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv
> or your very own
> Sony(tm)PSP.  Click here to play:
> http://sourceforge.net/geronimo.php
> _______________________________________________
> displaytag-user mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 



                
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to