var inputParameters = setDefaultParameters(argumentCollection=arguments);
var currentValue = arguments.value; // the field's current value
var initArgs = StructNew();
var selectionsArg = StructNew();
var appName = Application.ptPhotoGallery.getAppBeanName();
// init Arg struct
initArgs.fieldName = arguments.fieldName;
initArgs.catIDFilter = inputParameters.defaultCatID;
initArgs.renderCatFilter = inputParameters.renderCatFilter;
// Build the argument structure to pass into the Run Command
selectionsArg.item = currentValue;
selectionsArg.queryType = "selected";
selectionsArg.csPageID = request.page.id;
selectionsArg.fieldID = inputParameters.fieldID;
selectionsArg.catIDFilter = inputParameters.defaultCatID;
selectionsArg.renderCatFilter = inputParameters.renderCatFilter;
renderJSFunctions(argumentCollection=arguments,fieldParameters=inputParameters);
#application.ptPhotoGallery.utils.runCommand(beanName=inputParameters.chooserCFCName,
appName=appName,
methodName="loadStyles",
args=initArgs)#
Select the records you want to include in the selections by dragging
items into or out of the 'Available Items' list. Order the columns
within the datasheet by dragging items within the 'Selected Items' field.
// Set the query type flag before running the command
selectionsArg.queryType = "notselected";
#application.ptPhotoGallery.utils.runCommand(beanName=inputParameters.chooserCFCName,
appName=appName,
methodName="getSelections",
args=selectionsArg)#
// Set the query type flag before running the command
selectionsArg.queryType = "selected";
#application.ptPhotoGallery.utils.runCommand(beanName=inputParameters.chooserCFCName,
appName=appName,
methodName="getSelections",
args=selectionsArg)#
var inputParameters = Duplicate(arguments.fieldParameters);
var currentValue = arguments.value;
var appName = Application.ptPhotoGallery.getAppBeanName();
var cftPhotoChooserFooterJS = '';
application.ptPhotoGallery.scripts.addFooterJS(cftPhotoChooserFooterJS,"TERTIARY");
var inputParameters = Duplicate(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;
inputParameters.chooserAppName = "ptPhotoGallery";
if( NOT StructKeyExists(inputParameters, "defaultCatID") OR (NOT LEN(inputParameters.defaultCatID)) )
inputParameters.defaultCatID = "";
if( NOT StructKeyExists(inputParameters, "renderCatFilter") OR (NOT LEN(inputParameters.renderCatFilter)) )
inputParameters.renderCatFilter = "1";
if( NOT StructKeyExists(inputParameters, "loadAvailable") OR (NOT LEN(inputParameters.loadAvailable)) )
inputParameters.loadAvailable = "0"; // 0 = infinite selections are possible
return inputParameters;
private boolean function isMultiline()
{
return true;
}
public string function getResourceDependencies()
{
return listAppend(super.getResourceDependencies(), "jQuery,jQueryUI,ADFLightbox");
}
public string function loadResourceDependencies()
{
application.ptPhotoGallery.scripts.loadJQuery();
application.ptPhotoGallery.scripts.loadJQueryUI();
application.ptPhotoGallery.scripts.loadADFLightbox();
}