<%@ page language="java" import="java.util.*,java.beans.*,java.io.*,iDSS.*,iDSS.utils.*,iDSS.tidalData.*,iDSS.webBeans.*,iDSS.beans.*,iDSS.beans2.*,iDSS.grids.*" errorPage="/idss/error/error.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
	<TITLE><%=IDSSAppConstants.programTitle%></TITLE>

<META HTTP-EQUIV="KEYWORDS" CONTENT="internet-based, DSS, decision support system, Java, Enterprise edition, J2EE">
<META HTTP-EQUIV="DESCRIPTION" CONTENT="">		
</HEAD>

<jsp:useBean id="lcGridManagerJBean" scope="session" class="iDSS.beans2.LCGridManagerJBean"/>
<jsp:useBean id="modelSetupControllerJBean" scope="session" class="iDSS.beans2.ModelSetupControllerJBean"/>
<jsp:useBean id="statusJBean" scope="session" class="iDSS.beans2.StatusJBean"/>


<body>
<h2><%=IDSSAppConstants.modelSetupStatus%></h2>


<%

    statusJBean = modelSetupControllerJBean.getStatusBean();

    if(statusJBean.checkStatus()) {

        Hashtable modelSetupHashtable = modelSetupControllerJBean.getModelSetup();
        File f = new File(IDSSAppConstants.modelSetupHashtableFileName);
        boolean success = ObjectReadWrite.write(f,modelSetupHashtable);


        Hashtable tidalModels = (Hashtable)modelSetupHashtable.get(IDSSAppConstants.tidalModelsHashtableName);


%>
    <h3>test of the content of tidalModelsHashtable</h3>
    <p>tidalModels.size() : <%=tidalModels.size()%></p>
<%





    Enumeration tmKeys = tidalModels.keys();

    while(tmKeys.hasMoreElements()) {

        String tmKey = (String)tmKeys.nextElement();
        TidalModel tm = (TidalModel)tidalModels.get(tmKey);

        %>
            <p>tmKey : <%=tmKey%></p>
            <p>tm.getWeightage() : <%=tm.getWeightage()%></p>
        <%

    } //while(tmKeys.hasMoreElements())









        if(success) {
            %>
                <P>modelSetupHashtable written successfully.</P>
                <P>File : <%=f.toString()%></P>
            <%
        } //if(success)
        else {
            %>
                <P>modelSetupHashtable not written.</P>
                <P>File : <%=f.toString()%></P>
            <%
        } //else

    } //if(statusJBean.checkStatus())


%>
    <p>getDem() : <%=statusJBean.getDem()%></p>
    <p>getLcGrid() : <%=statusJBean.getLcGrid()%></p>
    <p>getTidalModels() : <%=statusJBean.getTidalModels()%></p>
    <p>getIsoMov() : <%=statusJBean.getIsoMov()%></p>
    <p>getVegMod() : <%=statusJBean.getVegMod()%></p>
    <p>getSlrScen() : <%=statusJBean.getSlrScen()%></p>
    <p>checkStatus() : <%=statusJBean.checkStatus()%></p>



</body>

</HTML>

