• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access Super Class property from the display tag in JSP

 
B Jha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic