src/web/js/acsimpleconfig.js
/**
 * This function will parse the parameters and fill the proper UI panel.
 * 
 * @param nParameters The parameters node.
 * 
 * @return Nothing.
 */
This function will parse the parameters and fill the proper UI panel.

@param nParameters The parameters node.

@return Nothing.
This function will parse the parameters and fill the proper UI panel . @param nParameters The parameters node . @return Nothing .
function fillStorageProviderConfig(sClass, nParameters)
{
	if (sClass == "com.cordys.coe.ac.emailio.storage.DBStorageProvider")
	{
		var sTemp = nParameters.selectSingleNode("ns:parameter[@name='compressdata']").text;
		cCompressData.setValue(sTemp);
		var nTemp = nParameters.selectSingleNode("ns:parameter[@name='dbconfig']");
		var nActual = getXMLRoot(nTemp);
		var sXMLData = "";
		if (nActual.nodeType == 1)
		{
			sXMLData = nActual.xml;
		}
		xmlDoc = createSimpleXMLDocument("<dbconfig xmlns=\"http://emailioconnector.coe.cordys.com/2.0/configuration\">" + nActual.xml + "</dbconfig>");
		mdlDatabase.putData(xmlDoc.documentElement);
		mdlDatabase.refreshAllViews();
	}
	else if (sClass == "com.cordys.coe.ac.emailio.storage.FileStorageProvider")
	{
		var sTemp = nParameters.selectSingleNode("ns:parameter[@name='errorfolder']").text;
		txtFSErrorFolder.setValue(sTemp);
		sTemp = nParameters.selectSingleNode("ns:parameter[@name='logincomingmessages']").text;
		cFSLogIncomming.setValue(sTemp);
		sTemp = nParameters.selectSingleNode("ns:parameter[@name='logfolder']").text;
		cFSLogFolder.setValue(sTemp);
		sTemp = nParameters.selectSingleNode("ns:parameter[@name='triggerfolder']").text;
		txtFSTriggerFolder.setValue(sTemp);
	}
	else if (sValue == "com.cordys.coe.ac.emailio.storage.DefaultMemoryStore")
	{
	}
	else
	{
		var anNodes = nParameters.selectNodes("//ns:parameter");
		var xmlDoc = createSimpleXMLDocument("<parameters/>");
		var nRoot = xmlDoc.documentElement;
		for (var iCount = 0; iCount < anNodes.length; iCount++) 
		{
			var sName = anNodes[iCount].getAttribute("name");
			var sType = anNodes[iCount].getAttribute("type");
			var sValue = anNodes[iCount].text;
			var nParam = createElementWithParentNS("parameter", nRoot);
			createTextElementWithParentNS("name", sName, nParam);
			createTextElementWithParentNS("type", sType, nParam);
			createTextElementWithParentNS("value", sValue, nParam);
		}
		mdlCustom.putData(nRoot);
		mdlCustom.refreshAllViews();
	}
}
function fillStorageProviderConfig ( sClass , nParameters ) { if ( sClass == "com.cordys.coe.ac.emailio.storage.DBStorageProvider" ) { var sTemp = nParameters . selectSingleNode ( "ns:parameter[@name='compressdata']" ) . text ; cCompressData . setValue ( sTemp ) ; var nTemp = nParameters . selectSingleNode ( "ns:parameter[@name='dbconfig']" ) ; var nActual = getXMLRoot ( nTemp ) ; var sXMLData = "" ; if ( nActual . nodeType == 1 ) { sXMLData = nActual . xml ; } xmlDoc = createSimpleXMLDocument ( "<dbconfig xmlns=\"http://emailioconnector.coe.cordys.com/2.0/configuration\">" + nActual . xml + "</dbconfig>" ) ; mdlDatabase . putData ( xmlDoc . documentElement ) ; mdlDatabase . refreshAllViews ( ) ; } else if ( sClass == "com.cordys.coe.ac.emailio.storage.FileStorageProvider" ) { var sTemp = nParameters . selectSingleNode ( "ns:parameter[@name='errorfolder']" ) . text ; txtFSErrorFolder . setValue ( sTemp ) ; sTemp = nParameters . selectSingleNode ( "ns:parameter[@name='logincomingmessages']" ) . text ; cFSLogIncomming . setValue ( sTemp ) ; sTemp = nParameters . selectSingleNode ( "ns:parameter[@name='logfolder']" ) . text ; cFSLogFolder . setValue ( sTemp ) ; sTemp = nParameters . selectSingleNode ( "ns:parameter[@name='triggerfolder']" ) . text ; txtFSTriggerFolder . setValue ( sTemp ) ; } else if ( sValue == "com.cordys.coe.ac.emailio.storage.DefaultMemoryStore" ) { } else { var anNodes = nParameters . selectNodes ( "//ns:parameter" ) ; var xmlDoc = createSimpleXMLDocument ( "<parameters/>" ) ; var nRoot = xmlDoc . documentElement ; for ( var iCount = 0 ; iCount < anNodes . length ; iCount ++ ) { var sName = anNodes [ iCount ] . getAttribute ( "name" ) ; var sType = anNodes [ iCount ] . getAttribute ( "type" ) ; var sValue = anNodes [ iCount ] . text ; var nParam = createElementWithParentNS ( "parameter" , nRoot ) ; createTextElementWithParentNS ( "name" , sName , nParam ) ; createTextElementWithParentNS ( "type" , sType , nParam ) ; createTextElementWithParentNS ( "value" , sValue , nParam ) ; } mdlCustom . putData ( nRoot ) ; mdlCustom . refreshAllViews ( ) ; } }
This function will parse the parameters and fill the proper UI panel.
This function will parse the parameters and fill the proper UI panel .
//The parameter is XML, so let's get it.
 //No parameters to write.
