Commit a0ccb2fb authored by bpandey's avatar bpandey

add use bean concept in jsp


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93472 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5048e344
<%@page import="java.rmi.RemoteException"%> <%@page import="java.rmi.RemoteException"%>
<%@page import="ibase.webitm.utility.ITMException"%> <%@page import="ibase.webitm.utility.ITMException"%>
<%@ page contentType="text/html"%> <%@page contentType="text/html"%>
<%@ page <%@page import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
import="javax.xml.parsers.DocumentBuilderFactory,javax.xml.parsers.DocumentBuilder,org.w3c.dom.*"%>
<%@page import="ibase.dashboard.sfa.ejb.*"%>
<%@page import="ibase.utility.CommonConstants"%> <%@page import="ibase.utility.CommonConstants"%>
<%@ page import="javax.naming.InitialContext"%> <%@page import="javax.naming.InitialContext"%>
<%@page import="javax.naming.Context"%> <%@page import="javax.naming.Context"%>
<%@page import="org.w3c.dom.Node"%> <%@page import="org.w3c.dom.Node"%>
<%@page import="java.util.ArrayList"%> <%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%> <%@page import="java.util.List"%>
<%@page import="org.w3c.dom.NodeList"%> <%@page import="org.w3c.dom.NodeList"%>
<%@page import="ibase.webitm.utility.GenericUtility"%> <%@page import="ibase.webitm.utility.GenericUtility"%>
<%@page import="ibase.dashboard.scm.bean.*"%>
<%@page import="ibase.dashboard.scm.ejb.*;"%> <jsp:useBean id="scmdasBean" scope="request" class="ibase.dashboard.scm.bean.LocationStockOccuBean"/>
<html> <html>
<head> <head>
<link rel="stylesheet" href="/ibase/dashboard/scm/css/style.css" type="text/css" /> <link rel="stylesheet" href="/ibase/dashboard/scm/css/style.css" type="text/css" />
...@@ -31,8 +28,7 @@ ...@@ -31,8 +28,7 @@
NodeList dtlList = null; NodeList dtlList = null;
Node parentNode = null; Node parentNode = null;
NodeList childNodeList = null; NodeList childNodeList = null;
Node currDetail = null; Node currDetail = null;
LocationStockOccupancyRemote locationStockOccupancy = null;
String childNodeName = "", locPhyArea = "", areaDtlString = "", selectedArea = "", siteCode = " ",imgSrc =""; String childNodeName = "", locPhyArea = "", areaDtlString = "", selectedArea = "", siteCode = " ",imgSrc ="";
NodeList rowList = null, stackList = null, columnList = null; NodeList rowList = null, stackList = null, columnList = null;
boolean stockNotPresent; boolean stockNotPresent;
...@@ -43,8 +39,8 @@ ...@@ -43,8 +39,8 @@
NodeList locationCodeList = null; NodeList locationCodeList = null;
Node locationNode = null; Node locationNode = null;
NodeList stockList = null; NodeList stockList = null;
int frmTop; int frmTop;
int frmLeft; int frmLeft;
%> %>
<% <%
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT"); response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
...@@ -61,13 +57,13 @@ ...@@ -61,13 +57,13 @@
var selectedArea = document.getElementById("areaDropDwn").value; var selectedArea = document.getElementById("areaDropDwn").value;
window.location.replace("LocationStockOccupancy.jsp?name=" +selectedArea); window.location.replace("LocationStockOccupancy.jsp?name=" +selectedArea);
<% selectedArea = request.getParameter("name"); <% selectedArea = request.getParameter("name");
if(locationStockOccupancy !=null ) if(scmdasBean !=null )
{ {
if (selectedArea == null || selectedArea == "") if (selectedArea == null || selectedArea == "")
{ {
selectedArea = locationStockOccupancy.getSelectedArea(); selectedArea = scmdasBean.getSelectedArea();
} }
areaStr = locationStockOccupancy.getLocDtl(selectedArea, siteCode); areaStr = scmdasBean.getLocDtl(selectedArea, siteCode);
} }
%> %>
...@@ -288,20 +284,17 @@ ...@@ -288,20 +284,17 @@
//ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean) session.getAttribute("USER_INFO"); //ibase.utility.UserInfoBean userInfo = (ibase.utility.UserInfoBean) session.getAttribute("USER_INFO");
//String user = userInfo.getLoginCode(); //String user = userInfo.getLoginCode();
siteCode = request.getParameter("SITE_CODE"); siteCode = request.getParameter("SITE_CODE");
if (siteCode == null || siteCode.trim().length() == 0 ) { if (siteCode == null || siteCode.trim().length() == 0 )
//siteCode = userInfo.getSiteCode();
}
siteCode = "TA821";//this is static .because there is no data found
Context context = new InitialContext();
locationStockOccupancy = (LocationStockOccupancyRemote) context .lookup("ibase/LocationStockOccupancy/remote");
{
if(xmlString == "")
{ {
xmlString = locationStockOccupancy.getLocPhyArea(); //siteCode = userInfo.getSiteCode();
}
} siteCode = "TA821";//this is static .because there is no data found
} if(xmlString == "")
{
xmlString = scmdasBean.getLocPhyArea();
}
%> %>
<body> <body>
<table > <table >
...@@ -350,13 +343,13 @@ ...@@ -350,13 +343,13 @@
<td></td> <td></td>
</tr> </tr>
<% <%
if(locationStockOccupancy!=null) if(scmdasBean!=null)
{ {
if (selectedArea == null || selectedArea == "") if (selectedArea == null || selectedArea == "")
{ {
selectedArea = locationStockOccupancy.getSelectedArea(); selectedArea = scmdasBean.getSelectedArea();
} }
areaStr = locationStockOccupancy.getLocDtl(selectedArea, siteCode); areaStr = scmdasBean.getLocDtl(selectedArea, siteCode);
} }
%> %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment