Neptune 1.0 Beta 1 Documentation: Records Components

Neptune Information

Download from RIA Forge

Records Components

The components created by the generator extend a component called Records.cfc that sits in the com.sebtools package. The Records.cfc component provides an interface to several basic CRUD and file management capabilities that are needed in many applications. Most of these can be defined in the XML returned from the "xml" method, which is also created by the generator.

You can usually make changes to just the XML in the "xml" method to effectuate changes both in the component itself and in the forms and tables of the administrative area. This is due to methods in Records.cfc itself that both cf_sebForm and cf_sebTable look for and use.

For example, you can change the "Label" attribute of a field in the "xml" method and it will change the label for the field in any table or form that uses that component.

The easiest way to explore different types of fields is to create them in the generator and look at the XML that it writes. Once you understand the XML, you can add new fields without the use of the generator.

The "init" methods of Records Components are inherited from Records.cfc and take Manager.cfc as their first and only arguments. Although Records Components are required to accept Manager.cfc as an argument with the name of "Manager", they can have their own "init" method, using the following code as a basis:

<cffunction name="init" access="public" returntype="any" output="no">
	<cfargument name="Manager" type="any" required="yes">
	
	<cfset initInternal(argumentCollection=arguments)>
	
	<cfreturn this>
</cffunction>

The key point here, is that arguments.Manager must be passed into the "initInternal" method, which will do the following: