Neptune 1.0 Beta 3 Documentation: cf_sebTable pkfield Error

Neptune Information

Download from RIA Forge

cf_sebTable pkfield Error

The pkfield attribute for cf_sebTable is required.

This error is somewhat common and actually plays into how multiple aspects of Neptune play together.


The cf_sebTable tag requires a "pkfield" attribute. If it is passed a CFC_Component representing a component with a "getMetaStruct" method then it can get the "pkfield" attribute from "arg_pk" item of that structure.

It can also get all of the other "CFC_" attributes for the "getMetaStruct" method.


All Records.cfc components (that is, components that extend Records.cfc - usually via "com.sebtools.Records") have a "getMetaStruct" method.

So, so long as a Records.cfc component (or a component that implements the "getMetaStruct" method in the same manner) is passed into "CFC_Component" then that "pkfield" attribute should be set appropriately. Of course, it could be set manually as well.

cf_sebTable Global Variables

The cf_sebTable need not have the "CFC_Component" attribute set directly in the tag. It could instead take advantage of global variables to set those attributes.

So, if the "Variables.sebTableAttributes.CFC_Component" variable exists in the calling page, then that will effectively set the "CFC_Component" attribute of the cf_sebTable tag (enabling it to get the other attributes it needs as desribed above).

Page Controller

Setting variables on a page is the job of the page controller. Neptune extends the basic page controller and has it set the value of "Variables.sebTableAttributes.CFC_Component" for any list page (file ending with "-list.cfm").

In order to do that, however, the page controller must be called from the page. That is done by the following code:


This will work even if you haven't actually created a page controller as Neptune will just use the existing page controller which will find the appropriate component and set it to the global variable mentioned above.

Neptune Framework

In order to do this, however, it must figure out which component matches the file. Although you could do this manually if you wanted, Neptune can figure this out for you if you follow the conventions it expects.

Neptune expects your file to be in the program that holds the component that you are looking for. It then looks for a Records component (either standing alone or as part of a ProgramManager component) that matches the name of your file.

For this to work, your file must be named as the singular version of the data being represented (with underscores replacing special characters) followed by "-list.cfm".

So, if you have a "Contacts.cfc" (entity="Contact") then you would need a "contact-list.cfm" and if you have a ContactTypes.cfc (entity="Contact Type") then would need a "contact_type-list.cfm" file.

If your files do no match this convention then you will have to set the CFC_Component attribute yourself.

Note that Neptune works the same with regard to cf_sebForm on "-edit.cfm" pages.