Commit 72424aaa authored by bpandey's avatar bpandey

removed static code for siteCode


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93422 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e393cd7b
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
NodeList stockList = null; NodeList stockList = null;
int frmTop; int frmTop;
int frmLeft; int frmLeft;
// ArrayList<String>() colImg=null;%>
<% <%
response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT"); response.setHeader("Expires", "Sat, 6 May 1995 12:00:00 GMT");
response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate"); response.setHeader("Cache-Control", "no-store, no-cache,must-revalidate");
...@@ -63,12 +63,12 @@ ...@@ -63,12 +63,12 @@
<% selectedArea = request.getParameter("name"); <% selectedArea = request.getParameter("name");
if(locationStockOccupancy !=null ) if(locationStockOccupancy !=null )
{ {
if (selectedArea == null) if (selectedArea == null || selectedArea == "")
{ {
selectedArea = locationStockOccupancy.getSelectedArea(); selectedArea = locationStockOccupancy.getSelectedArea();
} }
areaStr = locationStockOccupancy.getLocDtl(selectedArea, siteCode); areaStr = locationStockOccupancy.getLocDtl(selectedArea, siteCode);
System.out.print("area String in getDtl =" + areaStr);
} }
%> %>
} }
...@@ -90,9 +90,7 @@ ...@@ -90,9 +90,7 @@
function getStockDtl(location,row,stack,column) function getStockDtl(location,row,stack,column)
{ {
var newTable,startTag,endTag; var newTable,startTag,endTag;
/* startTag="<TABLE id='mainTable' class='tbldetail' border='1'><TBODY><TR class='tblheader'><TD>ITEM CODE</TD> <TD>LOT SL</TD><TD>QUANTITY</TD> <TD>LOT NO</TD></TR>" */ startTag="<TABLE id='parentStkTbl' class='parentstktbl' ><TBODY>"
startTag="<TABLE id='parentStkTbl' class='parentstktbl' ><TBODY>"
endTag="</TBODY></TABLE>" endTag="</TBODY></TABLE>"
newTable=startTag; newTable=startTag;
...@@ -101,7 +99,6 @@ ...@@ -101,7 +99,6 @@
%> %>
data="<%=areaStr%>"; data="<%=areaStr%>";
// alert("Data is "+data);
if (window.DOMParser) if (window.DOMParser)
{ {
parser = new DOMParser(); parser = new DOMParser();
...@@ -115,8 +112,7 @@ ...@@ -115,8 +112,7 @@
if (xmlDoc != null && xmlDoc != "") if (xmlDoc != null && xmlDoc != "")
{ {
x=xmlDoc.getElementsByTagName("loc_phy_area")[0] x=xmlDoc.getElementsByTagName("loc_phy_area")[0]
// alert("Area is ="+x.getAttribute("area")); locPhyRowList=x.childNodes;
locPhyRowList=x.childNodes;
if(locPhyRowList !=null) if(locPhyRowList !=null)
{ {
for (i = 0; i < locPhyRowList.length; i++) for (i = 0; i < locPhyRowList.length; i++)
...@@ -128,7 +124,7 @@ ...@@ -128,7 +124,7 @@
if(rowValue==row) if(rowValue==row)
{ {
// alert("Row after is ="+locPhyRowList[i].attributes.getNamedItem("row").nodeValue);
locPhyStackList=locPhyRow.childNodes; locPhyStackList=locPhyRow.childNodes;
for (j = 0; j < locPhyStackList.length; j++) for (j = 0; j < locPhyStackList.length; j++)
...@@ -140,7 +136,7 @@ ...@@ -140,7 +136,7 @@
stackValue=locPhyStackList[j].attributes.getNamedItem("stack").nodeValue; stackValue=locPhyStackList[j].attributes.getNamedItem("stack").nodeValue;
if(stackValue ==stack) if(stackValue ==stack)
{ {
// alert("Stack Node Value is ="+locPhyStackList[j].attributes.getNamedItem("stack").nodeValue);
locPhyColList=locPhyStack.childNodes; locPhyColList=locPhyStack.childNodes;
for (k = 0; k < locPhyColList.length; k++) for (k = 0; k < locPhyColList.length; k++)
{ {
...@@ -149,7 +145,7 @@ ...@@ -149,7 +145,7 @@
if(colValue==column) if(colValue==column)
{ {
// alert("Column is ="+locPhyCol.getAttribute("col"));
locationCodeList=locPhyCol.childNodes; locationCodeList=locPhyCol.childNodes;
for (l = 0; l <locationCodeList.length; l++) for (l = 0; l <locationCodeList.length; l++)
...@@ -288,18 +284,24 @@ ...@@ -288,18 +284,24 @@
</head> </head>
<% <%
try { try {
System.out.print("in JSP");
// 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=siteCode.getLoginSite() siteCode = request.getParameter("SITE_CODE");
siteCode = "TA821"; if (siteCode == null || siteCode.trim().length() == 0 )
// System.out.println("user ::" + user); {
siteCode = userInfo.getSiteCode();
}
// siteCode = "TA821";
Context context = new InitialContext(); Context context = new InitialContext();
locationStockOccupancy = (LocationStockOccupancyRemote) context .lookup("ibase/LocationStockOccupancy/remote"); locationStockOccupancy = (LocationStockOccupancyRemote) context .lookup("ibase/LocationStockOccupancy/remote");
{ {
if(xmlString == "")
{
xmlString = locationStockOccupancy.getLocPhyArea(); xmlString = locationStockOccupancy.getLocPhyArea();
System.out.println("Return xmlString====" + xmlString);
System.out.println("xmlString length is==>" + xmlString.length()); }
} }
%> %>
<body> <body>
...@@ -351,7 +353,7 @@ ...@@ -351,7 +353,7 @@
<% <%
if(locationStockOccupancy!=null) if(locationStockOccupancy!=null)
{ {
if (selectedArea == null) if (selectedArea == null || selectedArea == "")
{ {
selectedArea = locationStockOccupancy.getSelectedArea(); selectedArea = locationStockOccupancy.getSelectedArea();
} }
......
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