var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters); var currentValue = arguments.value; // the field's current value var readOnly = (arguments.displayMode EQ 'readonly') ? true : false; var formDataPageID = 0; var allAtrs = getAllAttributes(); inputParameters = setDefaultParameters(argumentCollection=arguments); // Get the DataPageID to see if this is a form to create a new record or update an existing record // 0 = new record and greater than 0 = existing record if ( StructKeyExists(allAtrs,"LayoutStruct") AND StructKeyExists(allAtrs.LayoutStruct,"UDFPAGEID") ) formDataPageID = allAtrs.LayoutStruct.UDFPAGEID; if ( LEN(TRIM(currentValue)) LTE 0 ) { currentValue = inputParameters.uncheckedVal; //'no' // If no value and this is a new record then use the defaulted value if ( formDataPageID EQ 0 AND inputParameters.defaultVal EQ "yes" ) currentValue = inputParameters.checkedVal; //'yes' } renderJSFunctions(argumentCollection=arguments, fieldParameters=inputParameters);
class="#inputParameters.fldClass#" value='yes' readonly="readonly" disabled="disabled">
var inputParameters = application.ADF.data.duplicateStruct(arguments.fieldParameters); var inputParameters = application.ADF.data.duplicateStruct(arguments.parameters); if ( NOT StructKeyExists(inputParameters, "fldClass") ) inputParameters.fldClass = ""; if ( NOT StructKeyExists(inputParameters, "fldName") ) inputParameters.fldName = arguments.fieldName; else if ( LEN(TRIM(inputParameters.fldName)) EQ 0 ) inputParameters.fldName = ReplaceNoCase(inputParameters.fieldName,'fic_',''); // Set the value that is stored when the checkbox is checked if ( NOT StructKeyExists(inputParameters, "checkedVal") ) inputParameters.checkedVal = "yes"; // Set the value that is stored when the checkbox is checked if ( NOT StructKeyExists(inputParameters, "uncheckedVal") ) inputParameters.uncheckedVal = "no"; // Set the field ID from the field name inputParameters.fldID = TRIM(inputParameters.fldName); return inputParameters; public string function getResourceDependencies() { return listAppend(super.getResourceDependencies(), "jQuery"); } public string function loadResourceDependencies() { application.ADF.scripts.loadJQuery(); }