<%-- $Id: alarmList.jsp,v 1.19.4.5 2004/05/11 17:18:03 asivakumar Exp $ --%>

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

<form name="listView">		  
  <table width="100%" border="0" cellspacing="0" cellpadding="2" align="center" class="rowBorder">
     <tr class="header2Bg"> 
	<td width="3%"><input name="toggleAll"  type="checkbox" onclick="javascript:ToggleAll(this,this.form)"></td>

         <c:forEach var="value" items="${headerList}">
            <c:set var="val" value="${value.columnName}"/>
              <TD>

          <c:choose>
           <c:when test="${!empty ComplexSearchView}">     
                    <span class="header2"><fmt:message key='webclient.fault.alarm.${value.columnName}'/></span>
           </c:when>
           <c:otherwise>
		     <a class="header2" href="javascript:doSorting('<c:out value="${isAscending}"/>','<c:out value="${val}"/>')">
                <fmt:message key='webclient.fault.alarm.${value.columnName}'/>
             <c:if test='${value.columnName == orderByColumn}'>
                 <c:choose>
                    <c:when test="${param.isAscending == 'true'}">
                       <img src="/webclient/common/images/sortup.gif" border=0 width="11" height="7" hspace="2" vspace="1" alt="" title="">
                   </c:when>
                   <c:otherwise>
                       <img src="/webclient/common/images/sortdown.gif" border=0 width="11" height="7" hspace="2" vspace="1" alt="" title="">
                  </c:otherwise>
                </c:choose>
            </c:if>
            <c:if test="${empty orderByColumn}"> 
               <c:if test="${value.columnName == 'modTime'}">
                   <img src="/webclient/common/images/sortdown.gif" border=0 width="11" height="7" hspace="2" vspace="1" alt="sortdown" title="sortdown">
               </c:if>
            </c:if>

            </a>
            </c:otherwise>    
           </c:choose>     
           </TD>

        </c:forEach>
		
        <c:forEach var="prop" items="${viewData}" varStatus="status">
           <TR>

       <td><input name="rowSelection"  type="checkbox" value="<c:out value='${prop.entity}'/>" onclick = "javascript:Toggle(this,this.form)"></td> 

    <c:forEach var="value1" items="${headerList}">

       <c:set var="val" value="${value1.columnName}"/>

         <c:url var="url" value="/fault/AlarmDetails.do?method=traversePage&tab=tabOne&entity=${prop.entity} "></c:url>
 
    <TD class=text>
       <c:choose>
         <c:when test="${val == 'severity'}">
               <div align="center"><img src="<c:out value="${prop.imgsrc}" />" border=0 width="16" height="16" hspace="1" alt="<c:out value="${prop.severity}"/>" title="<c:out value="${prop.severity}"/>"></div>
         </c:when>
         <c:when test="${val == 'previousSeverity'}">
             <c:choose>
                <c:when test="${prop.previousSeverity == '-'}">
                   <div align="center"> - </div>
                </c:when>
                <c:otherwise>
                  <div align="center"><img src="<c:out value="${prop.preimgsrc}" />" border=0 width="16" height="16" hspace="1" alt="<c:out value="${prop.previousSeverity}"/>" title="<c:out value="${prop.previousSeverity}"/>"></div>
                </c:otherwise>
			 </c:choose>
         </c:when>
         <c:when test="${val != 'entity'}" > 
            <c:choose>
               <c:when test='${prop[val] != ""}'>
                  <c:out value="${prop[val]}"/>
               </c:when>
               <c:otherwise>
                  &nbsp;
               </c:otherwise>
            </c:choose>
         </c:when>
         <c:otherwise> 
                 <c:choose>
                 <c:when test="${permittedToViewAlert == true}">
                   <a href="<c:out value='${url}'/>"><c:out value="${prop.entity}"/> </a>
                 </c:when>
                 <c:otherwise>
                   <c:out value="${prop.entity}"/>
                 </c:otherwise>
                </c:choose>
        </c:otherwise> 
      </c:choose>
      </TD>
    </c:forEach>
   </TR>
 </c:forEach>
</table>
</form>
