I am using struts2 + display tags for pagination.
In my StudentAction.java, i have qualificationMap which has a mapping qualification code with qualification name.
In my query.jsp, the following is the display part
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.
I obviously have very little understanding of your actual project/problem ... so i'm going to assume some things in my response but maybe what you need to do is provide a getter in your student object like getQualificationName which takes the qualification code and returns the mapped value. My understanding is that this student object has some codes which in turn you have mapped to display values which you are keeping in a map.
This should solve the problem if I'm understanding correctly ...
I am using struts2 + hibernate for the current project ...
I cannot just put a getter / setter / object in my Student class because this in turn will be mapped with the database <Hibernate used here>
I have a List<Student> which will contain student's details. this is student's table.
Eg
"std_fname"-"std_lname"-"father_name"-"qualification_code"-"contact_no"-"address"-"gender"-"category"
Johnny-Quest-Ramos-12-93232323-LA-Male-General
Qualfication code is mapped with a qualification name .. i.e 1->BE , 2->ME etc... This is a seperate table ...
Using struts tags , this will work when iterating each and every record in the studentList .
My StudentAction class contains getters for qualificationMap
Now when i am using displaytags , i iterate over the studentList, but when i come to qualification_code
This will give me only the integer part for each and every student ... This values keeps on changing for each and every student.
So i cannot just set one value.
But i want to display the mapped name from qualficationMap which is inside my StudentAction class.
So i tried combining different things like the qualificationMap[qualification_code] but it does not work.
Hope that you'll be able to understand the problem.
If i just know how to get the dynamic value in the display tag and get the mapped value from the Map, this will defenitely solve the problem.