<%--
 Copyright : All Rights Reserved. Copyright (C) 2006, Hitachi, Ltd.
 Title     : ServerConductor WebConsole
 Version   : 08-00
 Name      : envWebOther.jsp
 Date      : 2006/04/21
 Author    : Rakesh Dash
 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri = "/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri = "/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri = "/WEB-INF/common-tags.tld" prefix="util" %>
<%@ page language = "java" %>
<%@page errorPage = "errorDialog.jsp" %>
<%@ page import = 
 "JP.co.Hitachi.soft.System_Manager.webconsole.common.Const" %>
<%@page import = 
"JP.co.Hitachi.soft.System_Manager.webconsole.model.bean.ErrorBean"%>
<%@page import =
"JP.co.Hitachi.soft.System_Manager.webconsole.common.MessageConstant"%>

<%@ page contentType = "text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<% response.addHeader("Cache-Control","no-cache"); %>

<util:checkURL />

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

<html:html locale = "true">
    <head>
        <title></title>
        <script src = "js/common.js"> </script>                                 <% //800WA_WEBCONSOLE192 %>        
           <script src = "js/webconsetup.js"></script>            
           <link rel = "stylesheet" type = "text/css" href = "css/common.css">
           <link rel = "stylesheet" type = "text/css" href = "css/header.css"> 
    </head>
    <body onload = "document.forms[0].alertno.focus();">
            <html:form   action = "envWebOther"  
 onsubmit =  "setObject(document.forms[0].alertno);return validateSetUpForm();"><% //800WA_WEBCONSOLE304 %> <% //800WA_WEBCONSOLE391 %>
               <%-- This  will hold the AlertNo value get from  
                                                 WebConsoleAlertSettingBean--%>
               <util:set name = "AlertBeanValue">
                    <%=WebConsoleAlertSettingBean.getAlertno()%> 
               </util:set>
             
             <%-- This  will hold the User Type  get from  Session--%>
             <util:set name = "SesUserType">
                 <%= session.getAttribute(Const.ATTRIBUTE_SESSION_USER_TYPE) %> 
             </util:set>
                
             <%-- <table  border = "0" CELLSPACING = "0" width = "100%" 
                                                         align = "center"> --%> <%-- 800WA_WEBCONSOLE443 --%>
             <table  border = "0" CELLSPACING = "0" width = "100%" 
                                       cellpadding = "3"   align = "center">    <%-- 800WA_WEBCONSOLE443 --%>    
                 <tr>
                    <td align = "left" width = "50%">
                      <span class = "small">                                    <% // 800WA_WEBCONSOLE319 %>                                    
                        <bean:message bundle = 
                             "<%= Const.MESSAGE_RESOURCES_KEY_WEBCONSOLE%>"  
                             key = "envweb.detail.alert.count"/>
                      </span>                                                   <% // 800WA_WEBCONSOLE319 %> 
                    </td>
                    <td align = "left" width = "50%">
                        <html:text  size = "10" property = "alertno" 
                             maxlength = "3" value ="<%= pageContext.
                                  getAttribute("AlertBeanValue").toString() %>"
                styleClass = "small"  onchange= "setupFlag();setObject(this);"/><% // 800WA_WEBCONSOLE371 %>
                       <span class = "small">                                   <% // 800WA_WEBCONSOLE319 %> 
                          <bean:message bundle = 
                                "<%= Const.MESSAGE_RESOURCES_KEY_WEBCONSOLE%>"  
                                key = "envweb.detail.alert.AlertCount"/> 
                       </span>                                                  <% // 800WA_WEBCONSOLE319 %>                                    
                    </td>    
                    <%-- <td> --%>                                              <%-- 800WA_WEBCONSOLE443 --%>
                    <%-- Hidden field that will hold userType and populate
                                                                  form Bean--%>
                        <html:hidden property = "userType"  
                            value = "<%= pageContext.getAttribute("SesUserType")
                                                               .toString() %>"/>
                   <%-- </td> --%>                                              <%-- 800WA_WEBCONSOLE443 --%>
                </tr>                        
                <tr>
                    <td align = "right"colspan = "2">
                       <%-- <html:submit property = "submit" styleClass = "small" 
                                 onclick =  " return validateSetUpForm();"> --%><%-- 800WA_WEBCONSOLE451 --%>
               <%-- <html:submit property = "submit" styleClass = "small" > --%><%-- 800WA_WEBCONSOLE451 --%><%-- 800WA_WEBCONSOLE457 --%>
                       <html:submit property = "submit" styleClass = "small" 
                           disabled = "true">                                   <%-- 800WA_WEBCONSOLE457 --%>
                           <bean:message bundle = 
                                "<%= Const.MESSAGE_RESOURCES_KEY_WEBCONSOLE%>"
                                 key = "envweb.common.set.button"/>
                       </html:submit >
                   </td>                                    
                </tr>                        
          </table>
    </html:form>
 </body>
 <util:set name = "errorArray">
      var l_starrErrorMsg = new Array();
      var MSG_ALERTNUM_CHECK = "<%=MessageConstant.MSG_ALERTNUM_CHECK %>";
      var MSG_COMMON_POSITIVE_INTEGER_CHECK = 
                    "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>";
      var MSG_COMMON_RANGE_CHECK =
                               "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>";
            
     var WEB_ALERT_MIN_VALUE = "<%=Const.WEB_ALERT_MIN_VALUE%>";
     var WEB_ALERT_MAX_VALUE = "<%=Const.WEB_ALERT_MAX_VALUE %>";
     var WEB_ALERT_TEXT_NAME = "<%=Const.WEB_ALERT_TEXT_NAME%>";
            
    l_starrErrorMsg[MSG_ALERTNUM_CHECK ] = '<bean:message 
               bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
               key = "<%=MessageConstant.MSG_ALERTNUM_CHECK  %>"/>';

    l_starrErrorMsg[MSG_COMMON_POSITIVE_INTEGER_CHECK] = '<bean:message 
           bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
           key = "<%=MessageConstant.MSG_COMMON_POSITIVE_INTEGER_CHECK %>" 
           arg0 = "{0}"/>';

    l_starrErrorMsg[MSG_COMMON_RANGE_CHECK] = '<bean:message 
             bundle = "<%=Const.MESSAGE_RESOURCES_KEY_ERRMESSAGE %>" 
             key = "<%=MessageConstant.MSG_COMMON_RANGE_CHECK %>" 
             arg0 = "{0}" arg1 = "{1}" arg2 = "{2}"/>';

    </util:set>
    <script>    
            <%= pageContext.getAttribute("errorArray").toString()%>
            document.forms[0].submit.disabled = false;                          <%-- 800WA_WEBCONSOLE457 --%>
    </script>
</html:html>