Sample Code Functions

Sample code for the WebApplet_OutputChildPropertySets Function:

function WebApplet_OutputChildPropertySets(oPropertySet, nLevel, fp)
{
var oChildPropSet;
var nChild = 0;
Clib.fputs('-------------------------------------\n',fp);
Clib.fputs('CHILD PROPERTY SETS\n',fp);
Clib.fputs('-------------------------------------\n',fp);
if ( oPropertySet.GetChildCount() == 0 )
{
Clib.fputs('(NONE)\n',fp);
}
else
{
for ( nChild = 0; ( nChild <= oPropertySet.GetChildCount() - 1 ) ; nChild++ )
{
oChildPropSet = oPropertySet.GetChild(nChild);
WebApplet_OutputPropertySet (oChildPropSet, nLevel+1, fp);
}
}
}

Sample code for the WebApplet_OutputProperties Function:

function WebApplet_OutputProperties(oPropertySet, nLevel , fp )
{
var strName;
var strValue;
Clib.fputs('-------------------------------------\n',fp);
Clib.fputs('PROPERTIES\n',fp);
Clib.fputs('-------------------------------------\n',fp);
if (oPropertySet.GetPropertyCount() == 0 )
{
Clib.fputs('(NONE)\n',fp);
}
else
{
strName = oPropertySet.GetFirstProperty();
while ( strName != '')
{
Clib.fputs(strName + ' : ' + oPropertySet.GetProperty(strName) + '\n' ,fp);
strName = oPropertySet.GetNextProperty();
}
}
}

Sample code for the WebApplet_OutputPropertySet Function:

function WebApplet_OutputPropertySet(oPropertySet, nLevel, fp )
{
Clib.fputs('\n',fp);
Clib.fputs('-------------------------------------\n',fp);
Clib.fputs('START' + ' ',fp);
Clib.fputs('LEVEL : ' + nLevel + '\n', fp);
Clib.fputs('-------------------------------------\n',fp);
Clib.fputs('TYPE  : ' + oPropertySet.GetType() + '\n',fp);
Clib.fputs('VALUE : ' + oPropertySet.GetValue() + '\n',fp);
WebApplet_OutputProperties(oPropertySet, nLevel, fp);
WebApplet_OutputChildPropertySets(oPropertySet, nLevel, fp);
Clib.fputs('-------------------------------------\n',fp);
Clib.fputs('END' + ' ',fp);
Clib.fputs('LEVEL : ' + nLevel + '\n',fp);
Clib.fputs('-------------------------------------\n',fp);
}