I am displaying a student list(Name ,Mark, Result) using display tag in my struts 2 application.
if student scored more than 80 i need to display the entire row in green color else i need to display it in red color .Below is my scenario , i am not familiar with display tag, please help me to solve this issue.
<display:table name="studentList" id = "student" cellspacing="1px" class="center">
<display:caption class="caption"><b>Student Mark List</b></display:caption>
if(mark>=80)
{
<display:column title="Student Name" property="name" class="green"> </display:column>
<display:column title="Student Mark" property="mark" class="green"></display:column>
<display:column title="Student Result" property="result" class="green"> </display:column>
}
else
{
<display:column title="Student Name" property="name" class="red"> </display:column>
<display:column title="Student Mark" property="mark" class="red"></display:column>
<display:column title="Student Result" property="result" class="red"> </display:column>
}
Thanks in advance.