Commit 42be3be4 authored by dpawar's avatar dpawar

Add new method for handling domID


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99144 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a72c9ac2
......@@ -1358,7 +1358,8 @@ public class LocWisePickWizIC extends ValidatorEJB implements LocWisePickWizICLo
{
System.out.println("item change itm_default_add.............");
NodeList nodeList = allFormDataDom.getElementsByTagName("Detail3");
String domIdL = nodeList.item(0).getAttributes().getNamedItem("domID").getNodeValue();
//String domIdL = nodeList.item(0).getAttributes().getNamedItem("domID").getNodeValue();
String domIdL = getUpdateFlagFromDom(allFormDataDom, "3");
System.out.println("domIdLL=="+domIdL);
valueXmlString.append("<Detail3 domID='"+domIdL+"' selected=\"Y\">\r\n");
valueXmlString.append("<attribute selected=\"Y\" updateFlag=\"A\" status=\"O\" pkNames=\"\" />\r\n");
......@@ -2508,4 +2509,58 @@ public class LocWisePickWizIC extends ValidatorEJB implements LocWisePickWizICLo
return dataVolumeMap;
}
//Changed by sumit on 13/03/12 to reterive shipper size end
private String getUpdateFlagFromDom( Document dom, String objContext ) throws RemoteException,ITMException
{
NodeList detailList = null;
Node attrbNode = null, detailNode = null, reqDetail = null;
String retString = "";
int detailListLength = 0;
try
{
detailList = dom.getElementsByTagName("Detail"+objContext);
detailListLength = detailList.getLength();
for (int ctr = 0; ctr < detailListLength; ctr++)
{
detailNode = detailList.item(ctr);
retString = detailNode.getAttributes().getNamedItem("domID").getNodeValue();
System.out.println("detail node Dom ID:::::::::::+ "+retString);
if(detailNode != null)
{
System.out.println("detail node::::::::::: "+detailNode.getNodeName());
NodeList attrbNodeList = detailNode.getChildNodes();
for (int ctrA = 0; ctrA < attrbNodeList.getLength(); ctrA++)
{
attrbNode = attrbNodeList.item(ctrA);
if(attrbNode != null)
{
if( attrbNode.getNodeType() != Node.ELEMENT_NODE )
{
continue;
}
System.out.println("attrbNode node::::::::::: "+attrbNode.getNodeName());
if(attrbNode != null && "attribute".equalsIgnoreCase(attrbNode.getNodeName()))
{
System.out.println("attrbNode node::::::::::: ");
if("A".equalsIgnoreCase( attrbNode.getAttributes().getNamedItem("updateFlag").getNodeValue()))
{
return retString;
}
}
}
}
}
//test = detail3Node.getAttributes().getNamedItem("updateFlag").getNodeValue();
}
}
catch ( Exception e )
{
throw new ITMException(e);
}
return retString;
}
}
\ No newline at end of file
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