var inputParameters = application.ADF.data.duplicateStruct(arguments.fieldParameters);
var cftFASelectJS = "";;
application.ADF.scripts.addFooterJS(cftFASelectJS,"TERTIARY");
var defaultFAversion = variables.defaultFAversion;
var defaultIconDataFile = variables.defaultIconDataFile;
var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters);
// Set the defaults
if( NOT StructKeyExists(inputParameters,'addIconClass') OR !inputParameters.addIconClass )
inputParameters.addIconClass = false;
if( NOT StructKeyExists(inputParameters,'ShowSize') )
inputParameters.ShowSize = 0;
if( NOT StructKeyExists(inputParameters,'ShowFixedWidth') )
inputParameters.ShowFixedWidth = 0;
if( NOT StructKeyExists(inputParameters,'ShowBorder') )
inputParameters.ShowBorder = 0;
if( NOT StructKeyExists(inputParameters,'ShowSpin') )
inputParameters.ShowSpin = 0;
if( NOT StructKeyExists(inputParameters,'ShowPull') )
inputParameters.ShowPull = 0;
// Fix for bad version folder "Major.Minor.Maintenance". Should only be "Major.Minor" version.
// - If the "4.2.0" folder is found, use the default icon data file value
if( NOT StructKeyExists(inputParameters,'iconDataFile') OR LEN(TRIM(inputParameters.iconDataFile)) EQ 0 OR FindNoCase("/ADF/thirdParty/css/font-awesome/4.2.0/",inputParameters.iconDataFile))
inputParameters.iconDataFile = defaultIconDataFile;
// Validate if the property field has been defined
if ( NOT StructKeyExists(inputParameters, "fldID") OR LEN(inputParameters.fldID) LTE 0 )
inputParameters.fldID = arguments.fieldName;
return inputParameters;
private any function getValidationJS(required string formName, required string fieldName, required boolean isRequired)
{
if (arguments.isRequired)
return 'hasValue(document.#arguments.formName#.#arguments.fieldName#, "TEXT")';
return "";
}
private string function getValidationMsg()
{
return "Please select a value for the #arguments.label# field.";
}
private boolean function isMultiline()
{
return true;
}
/*
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(noConflict=true);
application.ADF.scripts.loadFontAwesome();
}
public string function getResourceDependencies()
{
return "jQuery,FontAwesome";
}