Difference between revisions of "General Chooser Property Component"

From ADF Docs
Jump to: navigation, search
(Created page with '== Overview == General Chooser Property Component is a component to build the data set and customize rendering for the field. Follow the …')
 
(Instructions)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
== Overview ==  
 
== Overview ==  
 
[[General_Chooser_Property_Component|General Chooser Property Component]] is a component to build the data set and customize rendering for the field.
 
[[General_Chooser_Property_Component|General Chooser Property Component]] is a component to build the data set and customize rendering for the field.
 +
 +
The [[General_Chooser_Property_Component|General Chooser Property Component]] is extended to the ADF General Chooser component (/ADF/extensions/customfields/general_chooser/general_chooser.cfc) and contains the functions for the base rendering.  By implementing this extension, we can defined a set of variables specific to the data set for the custom element to select. 
  
 
Follow the instructions below to setup a simple Property Component.
 
Follow the instructions below to setup a simple Property Component.
 +
  
 
== Instructions ==
 
== Instructions ==
 
# Copy the Sample_GC component from the ADF extensions general chooser directory (/ADF/extensions/customfields/general_chooser/general_chooser/sample_gc.cfc).
 
# Copy the Sample_GC component from the ADF extensions general chooser directory (/ADF/extensions/customfields/general_chooser/general_chooser/sample_gc.cfc).
 
# Paste the sample into your local sites CS Apps components directory (/mysite/_cs_apps/components/).  If the components directory does not exist, then create it.
 
# Paste the sample into your local sites CS Apps components directory (/mysite/_cs_apps/components/).  If the components directory does not exist, then create it.
#
+
# Rename the component file from "sample_GC.cfc" to the specific custom element that you are selecting.  (For example, with the Profile application a property component is named "profileGC.cfc" to select Profile custom element records.)  You will want to be able to recognize the custom element data for the property component by reading the name (don't make this harder on yourself than it needs to be here).
 +
# Open the property component in an editor. 
 +
# In the first set of variables with the comment ''CUSTOM ELEMENT INFO'', define the following variables that are specific to your custom element:
 +
## '''variables.CUSTOM_ELEMENT''' - The name of the custom element to select the records.
 +
## '''variables.CE_FIELD''' - The field name in the custom element that is a unique value for each record.  ('''Note''': Best practice is to use a UUID field in the custom field.)
 +
## '''variables.SEARCH_FIELDS''' - A comma separated list of the field names in the custom element that will be searched to filter available selections.
 +
## '''variables.ORDER_FIELD''' - The field name in the custom element to sort the available selections for rendering.
 +
# Save the property component.
 +
# Add an entry into the site's [[Proxy White List]].
 +
# [[Reset ADF|Reset the ADF]].

Latest revision as of 18:44, 18 November 2010

Overview

General Chooser Property Component is a component to build the data set and customize rendering for the field.

The General Chooser Property Component is extended to the ADF General Chooser component (/ADF/extensions/customfields/general_chooser/general_chooser.cfc) and contains the functions for the base rendering. By implementing this extension, we can defined a set of variables specific to the data set for the custom element to select.

Follow the instructions below to setup a simple Property Component.


Instructions

  1. Copy the Sample_GC component from the ADF extensions general chooser directory (/ADF/extensions/customfields/general_chooser/general_chooser/sample_gc.cfc).
  2. Paste the sample into your local sites CS Apps components directory (/mysite/_cs_apps/components/). If the components directory does not exist, then create it.
  3. Rename the component file from "sample_GC.cfc" to the specific custom element that you are selecting. (For example, with the Profile application a property component is named "profileGC.cfc" to select Profile custom element records.) You will want to be able to recognize the custom element data for the property component by reading the name (don't make this harder on yourself than it needs to be here).
  4. Open the property component in an editor.
  5. In the first set of variables with the comment CUSTOM ELEMENT INFO, define the following variables that are specific to your custom element:
    1. variables.CUSTOM_ELEMENT - The name of the custom element to select the records.
    2. variables.CE_FIELD - The field name in the custom element that is a unique value for each record. (Note: Best practice is to use a UUID field in the custom field.)
    3. variables.SEARCH_FIELDS - A comma separated list of the field names in the custom element that will be searched to filter available selections.
    4. variables.ORDER_FIELD - The field name in the custom element to sort the available selections for rendering.
  6. Save the property component.
  7. Add an entry into the site's Proxy White List.
  8. Reset the ADF.