strut2 + displaytags + hashmap

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

strut2 + displaytags + hashmap

vhmangaiha
I am using struts2 + display tags for pagination.
In my StudentAction.java, i have qualificationMap which has a mapping qualification code with qualification name.

private Map<String,String> qualificationMap=new HashMap<String,String>();


In my query.jsp, the following is the display part

<display:table id="student" name="studentList" pagesize="10" export="true" requestURI="/queryStudent" > 
 <display:column property="std_fname" title="std_fname"  /> 
<display:column property="std_lname" title="std_lname" /> 
<display:column property="father_name" title="father_name" /> 
 <s:property value="qualificationMap[qualification_code]"/>   // ***** PROBLEM HERE *******  
<display:column property="qualification_code"></display:column> 
 <display:column property="contact_no" sortable="true" /> 
 <display:column property="address" sortable="true" /> 
 <display:column property="gender" sortable="true" /> 
<display:column property="category" sortable="true" /> 
 <display:setProperty name="paging.banner.placement" value="bottom" /> 
</display:table> 


1. I am only able to display the qualification code and not the qualification name using display:column
2. The qualification name is the one that needs to displayed, it is stored in the Hashmap , how do i do this