<%-- 
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd. 
 Title     : ServerConductor WebConsole 
 Version   : 08-00 
 Name      : inventoryDetailList.jsp 
 Date      : 2006/04/12 
 Author    : Dharini N
--%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<%@ page language = "java" %>
<%@ page session = "false" %>
<%@ page errorPage = "errorDialog.jsp" %>
<%@ page import = "JP.co.Hitachi.soft.System_Manager.webconsole.common.Const"%>
<%@ page contentType = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %> 
<%@ page import = "java.util.Vector" %>
<%@ taglib prefix = "bean"  uri = "/WEB-INF/struts-bean.tld" %>
<%@ taglib prefix = "html"  uri = "/WEB-INF/struts-html.tld" %>
<%@ taglib prefix = "util"  uri = "/WEB-INF/common-tags.tld" %>
<%@ page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.InventoryDetailListBean"%>
<%@ page import = 																
"JP.co.Hitachi.soft.System_Manager.data.HsmConst" %> 							<% // 800WA_WEBCONSOLE167 %>
<%@ page import = 																
"JP.co.Hitachi.soft.System_Manager.data.HsmUrlData" %> 							
<%-- <% response.addHeader("Cache-control","NO CACHE"); %> --%>					<% // 800WA_WEBCONSOLE308 %>
<% response.addHeader("Cache-control","no-cache"); %> 							<% // 800WA_WEBCONSOLE308 %>
<util:checkURL/>

<%-- Get instance of InventoryDetailListBean in request scope--%>
<jsp:useBean id = "InventoryDetailListBean"
class = 
"JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.InventoryDetailListBean" 
scope = "request"/>

<%-- Declaring a vector to store the table data --%>
<%! Vector l_vtDetailInfo = new Vector(); %>

<%-- Get table data vector using instance of InventoryListBean --%>
<% l_vtDetailInfo = InventoryDetailListBean.getDetailInfo(); %>

<%									       										// 800WA_WEBCONSOLE167
String l_stHelp = (String) l_vtDetailInfo.get(0);								// 800WA_WEBCONSOLE167
String l_stUrl = (String) l_vtDetailInfo.get(1);								// 800WA_WEBCONSOLE167
%>									       										<% // 800WA_WEBCONSOLE167 %>

<%-- Get url of help in inventory detail block from the InventoryProperties file
 and set it into the pageContext implicit object as an attribute --%>
<util:set name = "InventoryDetailHelp">
<util:sanitize>
	<%-- <bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = "inventory.detail.os.win.help.url"/> --%>							<% // 800WA_WEBCONSOLE167 %>
	<bean:message bundle = '<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
		key = '<%= l_stUrl %>' />												<% // 800WA_WEBCONSOLE167 %>					
</util:sanitize>
</util:set>

<util:set name = "HelpActionClass">
	<util:rewrite action = "help" />
</util:set>

<util:set name = "FnOpenHelp">
	openHelp('<%= pageContext.getAttribute("HelpActionClass").toString() %>',
    '<%= pageContext.getAttribute("InventoryDetailHelp").toString() %>',
    '<%= Const.ATTRIBUTE_REQUEST_HELP_CONTENTS %>',								<% // 800WA_WEBCONSOLE158 %>
    '<%= request.getSession().getId() %>help');									<% // 800WA_WEBCONSOLE158 %>
</util:set>

<html:html locale = "true">
	<head>
		<link rel = "stylesheet" type = "text/css" href = "css/common.css">
		<script src = "js/header.js"></script>
		<script src = "js/common.js"></script>
	</head>
	<%-- <body> --%>                                                            <% // 800WA_WEBCONSOLE445 %>
	<body onclick = "releaseSelection()">                                       <% // 800WA_WEBCONSOLE445 %>
		<span class = "middle">
			<%-- Get the value of climb trail --%> 				
			<jsp:getProperty name = "InventoryDetailListBean" 
				property = "climbTrail"/>
		</span>
		<div align = "right">
			<html:link href = "#" styleClass = "small" onclick = 
				"<%=pageContext.getAttribute("FnOpenHelp").toString()%>">
				<util:sanitize>
                <%-- <bean:message bundle = 
                	'<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
	                key = "inventory.detail.os.win.help"/> --%>					<% // 800WA_WEBCONSOLE167 %>
	            <bean:message bundle = 
                	'<%= Const.MESSAGE_RESOURCES_KEY_INVENTORY %>' 
	                key = '<%= l_stHelp %>' />			 						<% // 800WA_WEBCONSOLE167 %>
    	        </util:sanitize>
			</html:link>
		</div>
		<hr>
		<table border = "1" width = "80%" align = "center">
			<tr class = "small">
			<%-- Get the left column header value from vector --%> 
			<% for(int l_iHead = 0;l_iHead < ((Vector)l_vtDetailInfo.get(2)).size();
				l_iHead++) {%>
				<th align = "left">
					 <% if(((String)((Vector)l_vtDetailInfo.get(2))				// 800WA_WEBCONSOLE430
					  	.get(l_iHead)).trim().length() != 0) {%>				<% // 800WA_WEBCONSOLE430 %>			
						<%= ((Vector)l_vtDetailInfo.get(2)).get(l_iHead) %>
						<% }													// 800WA_WEBCONSOLE430								
	    			  else { %>													<% // 800WA_WEBCONSOLE430 %>			
						 &nbsp;													<% // 800WA_WEBCONSOLE430 %>			
					    <% } %>													<% // 800WA_WEBCONSOLE430 %>			
				</th>
			<% } %>
			</tr>
			<%-- Get the table row values from vector --%>
			<%l: for(int l_iCol = 3;l_iCol < l_vtDetailInfo.size();
				l_iCol++) {%>
				<tr class = "small">
			<% for(int l_iCount = 0;l_iCount < ((Vector)l_vtDetailInfo.get(2)).size();
				l_iCount++) {%>
				
					<%-- <td> --%>												<% // 800WA_WEBCONSOLE088 %>
					<td class = "nowrap">										<% // 800WA_WEBCONSOLE088 %>
					<%
					String l_stNodeName = (String) 
						request.getParameter("nodeName");
					if(l_stNodeName.startsWith("Slot") && l_iCol == 4) { 
					  if(((String)((Vector)l_vtDetailInfo.get(l_iCol)).		
						            get(0)).trim().length() != 0) {%>			<% // 800WA_WEBCONSOLE430 %>			
						   		<% // get(0)).length() != 0) {%>				<% // 800WA_WEBCONSOLE430 %>			
						<%= ((Vector)l_vtDetailInfo.get(l_iCol)).get(0) %>
						<% }														
	    			  else { %>												
						 &nbsp;													
					    <% } %>	
					</td>
					<td>
					<html:img src = 
					'<%= ((HsmUrlData) ((Vector) l_vtDetailInfo.get(l_iCol)).get(1)).toString() %>' 
					alt = 
					'<%= ((HsmUrlData) ((Vector) l_vtDetailInfo.get(l_iCol)).get(1)).getAlt() %>'/>
					</td>
					<% continue l; } %>
					<% if(((String)((Vector)l_vtDetailInfo.get(l_iCol)).		// 800WA_WEBCONSOLE090
						get(l_iCount)).trim().length() != 0) {%>				<% // 800WA_WEBCONSOLE430 %>
					<% // get(l_iCount)).length() != 0) {%>						<% // 800WA_WEBCONSOLE090 %> <% // 800WA_WEBCONSOLE430 %>
						<%= ((Vector)l_vtDetailInfo.get(l_iCol)).get(l_iCount) %>
					<% }														// 800WA_WEBCONSOLE090
						else { %>												<% // 800WA_WEBCONSOLE090 %>
						 &nbsp;													<% // 800WA_WEBCONSOLE090 %>
					<% } %>						 								<% // 800WA_WEBCONSOLE090 %>
					
					<%-- <td> --%>												<% // 800WA_WEBCONSOLE088 %>
				<%--<td class = "nowrap">										<% // 800WA_WEBCONSOLE088 %>
					<% if(((String)((Vector)l_vtDetailInfo.get(l_iCount)).		// 800WA_WEBCONSOLE090
						get(1)).length() != 0) { %>								<% // 800WA_WEBCONSOLE090 %>
						<%= ((Vector)l_vtDetailInfo.get(l_iCount)).get(1) %>
					<% }														// 800WA_WEBCONSOLE090
						else { %>												<% // 800WA_WEBCONSOLE090 %>
						 &nbsp;													<% // 800WA_WEBCONSOLE090 %>
					<% } %>						 								<% // 800WA_WEBCONSOLE090 %>
					--%>
					</td>
					<% } %>
				</tr>
			<% } %>
		</table>
	</body>
</html:html>