aspose file tools*
The moose likes Other Open Source Projects and the fly likes Access Super Class property from the display tag in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Access Super Class property from the display tag in JSP" Watch "Access Super Class property from the display tag in JSP" New topic
Author

Access Super Class property from the display tag in JSP

B Jha
Greenhorn

Joined: Oct 12, 2009
Posts: 1
Hi,

I have got two class, say A and Ak in Hibernate. Ak has the properties that constitute the primary key of a table T and A has rest of the properties of table T.
I use these two classes in such a way, that I can do - setKey(new Ak()) for an object of A.

So, in my jsp, I am getting a list of objects of A, which have all the properties populated (of its own as well as for the keys in Ak).
To get an object from Ak, I need to do - a.getKey().getKeyProperty(), where "a" is an object of "A".

How should I use the same inside the display tag.
I cannot use :
<display:table name="AList" class="scrollContent" id="externalTable" requestURI="<%=requestURI%>" sort="list">
<display:column property="keyProperty" style="width:70px;" title="KeyProp" sortable="true" headerClass="fixedHeader" />

I don't have the property named keyProperty in my class "A". How should I get it here from Ak.

Please help.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi B Jha and welcome to Javaranch,

I'm afraid I can't answer your question directly, but have you tried searching this forum for similar questions?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Access Super Class property from the display tag in JSP
 
Similar Threads
Struts2 Display tag naming convention
struts 2 action using model objects
DisplayTag + PaginatedList + Struts2
Pagination in Struts2
Using Displaytag, Checkboxes and Struts to get values - I'm a bit lost