From: <ndi...@us...> - 2002-10-03 05:46:40
|
Update of /cvsroot/modus/modustest/contentobjects In directory usw-pr-cvs1:/tmp/cvs-serv21711/contentobjects Added Files: categorypicker.cfc Log Message: this is a try at one way to make SELECT fields -- by just creating a field implementation that deals with it internally. Still mulling over how to build abstracted SELECT widgets, but for now this proves the underlying machinery is working. --- NEW FILE: categorypicker.cfc --- <cfcomponent extends="org.bacfug.modus.fields.baseField" hint="A simple list of categories for press releases"> <!--- override the toFormField method to make a SELECT with months in it ---> <cffunction name="toFormField" access="public" output="no" hint="returns a simple SELECT form widget" returnType="string"> <cfset var options = arrayNew(1)> <cfscript> arrayAppend(options,instance.formFieldFactory.newSelectOption("corp","Corporate")); arrayAppend(options,instance.formFieldFactory.newSelectOption("prod","Product")); arrayAppend(options,instance.formFieldFactory.newSelectOption("people","People")); </cfscript> <cfreturn instance.formFieldFactory.makeSelect(getName(),getValue(),options)> </cffunction> </cfcomponent> |