Tuesday, January 21, 2014

Odd even apply on iterator table using status in java tag

Using  status odd even apply that means odd row show present and even row show past and also color apply From qregPolice

<%@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>












From ACO odd even apply using status



<%@taglib prefix="s" uri="/struts-tags"%>
<div  id="pageNavPosition" style="padding-bottom: 2px;" align="left">
    </div>
    <div id="displayDataDiv"  style="float:left;width:584px;height:auto;overflow:auto;overflow-x:scroll;">   
   
<table id="tablepaging" class="yui" align="center">
        <tr bordercolor="#FFFFFF" >
        
          <th>Search</th>         
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>
          <th><input name="filter" size="8" onkeyup="Table.filter(this,this)"></th>         
       </tr>
       <tr>       
          <th  scope="col">HTN Rank</th>
          <th  scope="col">Confirmation</th>
          <th  scope="col">Not Qualified Reason</th>
          <th  scope="col">Not Qualified Date</th>
          <th  scope="col">Recent BP</th>
          <th  scope="col">BP Date</th>
          <th  scope="col">Systolic</th>
          <th  scope="col">Diastolic</th>
          <th  scope="col">Comments</th>
       </tr>
      
      <s:iterator value="hypertensionList" status="acd">
     
     <s:if test="#acd.odd==true">
         <tr class="odd" >
         
          <td align="center"><s:property value="htn_rank"/></td>
          <td align="center"><s:property value="htn_confirmed"/></td>
          <td align="center"><s:property value="htn_not_qualified_reason"/></td>
          <td align="center"><s:property value="htn_not_qualified_date"/></td>
          <td align="center"><s:property value="htn_recent_bp"/></td>
          <td align="center"><s:property value="htn_bp_date"/></td>
          <td align="center"><s:property value="htn_bp_systolic"/></td>
          <td align="center"><s:property value="htn_bp_diastolic"/></td>
          <td align="center"><s:property value="htn_comments"/></td>
          </tr>
          </s:if>
          <s:else>
           <tr class="even" >
         
          <td align="center"><s:property value="htn_rank"/></td>
          <td align="center"><s:property value="htn_confirmed"/></td>
          <td align="center"><s:property value="htn_not_qualified_reason"/></td>
          <td align="center"><s:property value="htn_not_qualified_date"/></td>
          <td align="center"><s:property value="htn_recent_bp"/></td>
          <td align="center"><s:property value="htn_bp_date"/></td>
          <td align="center"><s:property value="htn_bp_systolic"/></td>
          <td align="center"><s:property value="htn_bp_diastolic"/></td>
          <td align="center"><s:property value="htn_comments"/></td>
          </tr>
          </s:else>
        </s:iterator>
      
      </table>
       
   
    </div>
   



   

No comments:

Post a Comment