Commit d6aed501 authored by vlagad's avatar vlagad

get objName From dom & set to local variable

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@210556 ce508802-f39f-4f6c-b175-0d175dae99d5
parent faf632c6
...@@ -12,6 +12,7 @@ import javax.ejb.Stateless; // added for ejb3 ...@@ -12,6 +12,7 @@ import javax.ejb.Stateless; // added for ejb3
import org.w3c.dom.CDATASection; import org.w3c.dom.CDATASection;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
...@@ -126,14 +127,23 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal ...@@ -126,14 +127,23 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal
{ {
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
dom = parseString(xmlString1); dom = parseString(xmlString1);
objName = "user"; //Added By Vikas Lagad On 24-OCT-2019[to get objName from dom]Start
winName = "w_user"; //objName = "user";
//winName = "w_user";
NodeList parentNodeList = null; NodeList parentNodeList = null;
NodeList childNodeList = null; NodeList childNodeList = null;
Node parentNode = null; Node parentNode = null;
Node childNode = null; Node childNode = null;
String childNodeName = null; String childNodeName = null;
parentNodeList = dom.getElementsByTagName("Detail1"); parentNodeList = dom.getElementsByTagName("Detail1");
if(parentNodeList != null )
{
objName = ((Element)parentNodeList.item(0)).getAttribute("objName");
}
else
{
objName = "user";
}
parentNode = parentNodeList.item(0); parentNode = parentNodeList.item(0);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
for(int i=0; i<childNodeList.getLength(); i++) for(int i=0; i<childNodeList.getLength(); i++)
...@@ -165,6 +175,9 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal ...@@ -165,6 +175,9 @@ public class SysGenPassword extends ValidatorEJB implements SysGenPasswordLocal
} }
} }
} }
System.out.println("objName..........."+objName);
winName = "w_"+objName;
//Added By Vikas Lagad On 24-OCT-2019[to get objName from dom]End
sql="select acct_lock from users where code = '"+code+"' "; sql="select acct_lock from users where code = '"+code+"' ";
//System.out.println("[SysGenPasswordEJB] SQL..................."+sql); //System.out.println("[SysGenPasswordEJB] SQL..................."+sql);
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
......
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