Difference between revisions of "CEData 1 0-getCEData"

From ADF Docs
Jump to: navigation, search
Line 76: Line 76:
 
 
 
</table>
 
</table>
 +
 +
== Examples ==
 +
 +
The getCEDdata function is handy way to get element data out of a CommonSpot custom element. Making a call to this method will return an Array of Structures of the data contained in the element.
 +
 +
<!--
 +
=== CE Data calls return Taxonomy Term ID ===
 +
If you have Taxonomy fields inside your Custom Element and you make calls to get data for that custom Element using CEData, the Taxonomy fields will return term ID's.  You can convert those term ID's using code like this:
 +
<source lang="cfm">
 +
<cfscript>
 +
    // custom element data
 +
    data = application.ADF.ceData.getCEData("My Element");
 +
    // returns taxonomy object
 +
    taxObj = application.ADF.taxonomy.getCSTaxObj("My Taxonomy");
 +
</cfscript>
 +
 +
<cfloop from="1" to="#arrayLen(data)#" index="itm">
 +
    <!---// renders the term name instead of the term id --->
 +
    <cfoutput>#taxObj.getTermName(data[itm].values.myTaxField)#</cfoutput>
 +
</cfloop>
 +
</source>
 +
 +
-->

Revision as of 21:02, 13 August 2010

Attention: Do not change any text in the description, signature, and paramter sections.

Return to CEData_1_0

Description

Returns array of structs for all data matching the Custom Element.

Signature

public array getCEData ( string customElementName, string customElementFieldName, any item, string queryType, string searchValues, string searchFields )

Parameters

Required Name Type Description
required customElementName string
optional customElementFieldName string [Default: ]
  item any [Default: ]
  queryType string [Default: selected]
  searchValues string [Default: ]
  searchFields string [Default: ]

Examples

The getCEDdata function is handy way to get element data out of a CommonSpot custom element. Making a call to this method will return an Array of Structures of the data contained in the element.

   <cfoutput>#taxObj.getTermName(data[itm].values.myTaxField)#</cfoutput>
</cfloop>

</source>

-->