Access Super Class property from the display tag in JSP
posted 6 years ago
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.