// Set the query type flag before running the command
selectionsArg.queryType = "notselected";
#application.ADF.utils.runCommand(beanName=inputParameters.chooserCFCName,
methodName="getSelections",
args=selectionsArg,
appName=inputParameters.chooserAppName)#
// Set the query type flag before running the command
selectionsArg.queryType = "selected";
#application.ADF.utils.runCommand(beanName=inputParameters.chooserCFCName,
methodName="getSelections",
args=selectionsArg,
appName=inputParameters.chooserAppName)#
var inputParameters = application.ADF.data.duplicateStruct(arguments.fieldParameters);
var readOnly = (arguments.displayMode EQ 'readonly') ? true : false;
var cftGeneralChooserFooterJS = '';
var CSRF_Token = application.ADF.csSecurity.getCSRF_Token();
application.ADF.scripts.addFooterJS(cftGeneralChooserFooterJS,"TERTIARY");
var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters);
// overwrite the field ID to be unique
inputParameters.fieldID = arguments.fieldName;
// Set the defaults
if( StructKeyExists(inputParameters, "forceScripts") AND (inputParameters.forceScripts EQ "1") )
inputParameters.forceScripts = true;
else
inputParameters.forceScripts = false;
if( NOT StructKeyExists(inputParameters, "minSelections") )
inputParameters.minSelections = "0"; // 0 = selections are optional
if( NOT StructKeyExists(inputParameters, "maxSelections") )
inputParameters.maxSelections = "0"; // 0 = infinite selections are possible
if( NOT StructKeyExists(inputParameters, "loadAvailable") )
inputParameters.loadAvailable = "0"; // 0 = boolean - 0/1
if ( NOT StructKeyExists(inputParameters,"chooserCFCName") )
inputParameters.chooserCFCName = "";
else
inputParameters.chooserCFCName = TRIM(inputParameters.chooserCFCName);
if ( NOT StructKeyExists(inputParameters,"chooserAppName") )
inputParameters.chooserAppName = "";
else
inputParameters.chooserAppName = TRIM(inputParameters.chooserAppName);
return inputParameters;
private any function getValidationJS(required string formName, required string fieldName, required boolean isRequired)
{
return "#arguments.fieldName#_validate()";
}
private string function getValidationMsg()
{
return ''; // validator does alert itself dynamically, this keeps the default alert from happening too
}
/*
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()
{
var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters);
inputParameters = setDefaultParameters(argumentCollection=arguments);
// Load registered Resources via the ADF scripts_2_0
application.ADF.scripts.loadJQuery(noConflict=true);
application.ADF.scripts.loadJQueryUI();
application.ADF.scripts.loadADFLightbox();
application.ADF.scripts.loadCFJS();
}
public string function getResourceDependencies()
{
return "jQuery,jQueryUI,ADFLightbox,jQueryUIDefaultTheme,CFJS";
}