Saturday, March 29, 2014

odd even color Like ACO

<%@taglib prefix="s" uri="/struts-tags" %>
<style type="text/css">
.odd{
background-color:#CCC;
}

.even{
background-color:#EEE;
}

</style>

<table border="0" cellpadding="0" cellspacing="0" style="width:214px;">

<tr>
    <td width="36%" style="font-family:Arial; font-size:12px; font-weight:bold; color:blue; text-decoration:underline;">Status</td>
    <td width="48%" style="font-family:Arial; font-size:12px; font-weight:bold; color:blue; text-decoration:underline;">Patient Name</td>
<td width="16%" style="font-family:Arial; font-size:12px; font-weight:bold; color:blue; text-decoration:underline;">SL</td>
</tr>

<s:iterator value="patientSeqList" status="status">
<s:if test="#status.odd==true">
<tr style="font-family:Arial; font-size:12px; font-weight:normal; color:#000;" class="odd">

<td >Present</td>
  <td><s:property value="PAT_NAME"/></td>
  <td><s:property value="PAT_SL"/></td>
</tr>
 </s:if>
<s:else>
<tr style="font-family:Arial; font-size:12px; font-weight:normal; color:#000;" class="even">
<td >Past</td>
  <td><s:property value="PAT_NAME"/></td>
  <td><s:property value="PAT_SL"/></td>
</tr>
</s:else>

</s:iterator>
</table>

No comments:

Post a Comment