var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters);
var currentValue = arguments.value; // the field's current value
var top = '';
var right = '';
var bottom = '';
var left = '';
inputParameters = setDefaultParameters(argumentCollection=arguments);
if( currentValue eq '' )
{
top = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=inputParameters.top);
right = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=inputParameters.right);
bottom = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=inputParameters.bottom);
left = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=inputParameters.left);
}
else
{
top = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 1, ' ' ) );
right = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 2, ' ' ) );
bottom = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 3, ' ' ) );
left = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=ListGetAt( currentValue, 4, ' ' ) );
}
currentValue = top & 'px ' & right & 'px ' & bottom & 'px ' & left & 'px';
// TODO: add a function that strips the px off of each value in the possible values string
// TODO: make sure each value in the possible values string is numeric
// TODO: strip the px off of the current value string before converting to individual values
renderJSFunctions(argumentCollection=arguments,fieldParameters=inputParameters);
var inputParameters = application.ADF.data.duplicateStruct(arguments.fieldParameters);
var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters);
// Validate if the property field has been defined
if ( NOT StructKeyExists(inputParameters, "fldID") OR LEN(inputParameters.fldID) LTE 0 )
inputParameters.fldID = arguments.fieldName;
if ( NOT StructKeyExists(inputParameters, "fieldID") )
inputParameters.fieldID = arguments.fieldName;
if ( (NOT StructKeyExists(inputParameters, "fieldClass")) OR ( LEN(TRIM(inputParameters.fieldClass)) LTE 0) )
inputParameters.fieldClass = "";
// Remove any labels from the possibleValues String
if ( StructKeyExists(inputParameters, "possibleValues") AND LEN(TRIM(inputParameters.possibleValues)) )
inputParameters.possibleValues = application.ADF.paddingSettings.normalizePaddingValues(PaddingValues=inputParameters.possibleValues);
else
inputParameters.possibleValues = "";
if( NOT StructKeyExists( inputParameters, 'ShowTop' ) )
inputParameters.ShowTop = 0;
if( NOT StructKeyExists( inputParameters, 'ShowRight' ) )
inputParameters.ShowRight = 0;
if( NOT StructKeyExists( inputParameters, 'ShowBottom' ) )
inputParameters.ShowBottom = 0;
if( NOT StructKeyExists( inputParameters, 'ShowLeft' ) )
inputParameters.ShowLeft = 0;
return inputParameters;
/*
IMPORTANT: Since loadResourceDependencies() is using ADF.scripts loadResources methods, getResourceDependencies() and
loadResourceDependencies() must stay in sync by accounting for all of required resources for this Custom Field Type.
*/
public void function loadResourceDependencies()
{
// Load registered Resources via the ADF scripts_2_0
application.ADF.scripts.loadJQuery();
}
public string function getResourceDependencies()
{
return "jQuery";
}