Ext.CFC v0.1 pre-release
Component Ext.CFC (Ext.CFC)



properties:
methods: decodeJSON*, encodeJSON*, init, initGrid, initGridFooter, printGrid, printGridColumnModel*, printGridDataStore*, printGridFooter*, printGridHTML*, printGridJS*, printGridRenders*, printJsonData, setGridCol, setGridQuery, StripHTML, stripTags, validateJSON*
* - private method

decodeJSON*
private any decodeJSON ( required string data )

Converts data frm JSON to CF format

Output: suppressed
Parameters:
   data: string, required, data

encodeJSON*
private string encodeJSON ( required any data, string queryFormat="query", string queryKeyCase="lower", numeric queryTotalCount )

Converts data from CF to JSON format

Output: suppressed
Parameters:
   data: any, required, data
   queryFormat: string, optional, queryFormat
   queryKeyCase: string, optional, queryKeyCase
   queryTotalCount: numeric, optional, queryTotalCount

init
public init ( )

Initialize CFC parameters

Output: suppressed

initGrid
public initGrid ( required string title, required string path, required string id, string name="data", numeric limit="25", boolean remotesorting="true", string defaultSortColumn="[runtime expression]", string defaultSortOrder="ASC", boolean singleSelect="true", boolean detailedView="true", boolean showDetailedView="true" )

Initialize the Ext Grid component

Output: suppressed
Parameters:
   title: string, required, title - Title for Grid display
   path: string, required, path - URL path to JSON data retrieval template
   id: string, required, id - name of Primary key field (unique identifier) in the query object passed into query arguement
   name: string, optional, name - singular name for grid, i.e. topic
   limit: numeric, optional, limit - Specify the number of records to display per page.
   remotesorting: boolean, optional, remotesorting - True if sorting is to be handled by requesting the Proxy to provide a refreshed version of the data object in sorted order, as opposed to sorting the Record cache in place (defaults to false)
   defaultSortColumn: string, optional, defaultSortColumn - Sets the default sort column to be used by the next load operation
   defaultSortOrder: string, optional, defaultSortOrder - Sets the default sort order to be used by the next load operation
   singleSelect: boolean, optional, singleSelect - specify if only row can be selected at a time.
   detailedView: boolean, optional, detailedView - specify whether or not you want a detailed view. Note: you must specify custom rendering.
   showDetailedView: boolean, optional, showDetailedView - If detailedView is true, this toggles if the detailed view is enabled by default.

initGridFooter
public initGridFooter ( string displayMessage="Displaying record {0} - {1} of {2}", string emptyMessage="No records to display", boolean displayInfo="true" )

Add a paging toolbar to the grid's footer

Output: suppressed
Parameters:
   displayMessage: string, optional, displayMessage - specify the message to display in the footer.
   emptyMessage: string, optional, emptyMessage - Message to be displayed when no records exist.
   displayInfo: boolean, optional, displayInfo - Specifies whether or not the paging status is display, as defined by the displayMessage argument

printGrid
public any printGrid ( )

output Ext grid JS and HTML to browser

Output: enabled

printGridColumnModel*
private printGridColumnModel ( )

print out the column model

Output: enabled

printGridDataStore*
private printGridDataStore ( )

prints the JS to create the Ext dataStore object

Output: enabled

printGridFooter*
private printGridFooter ( )

print out the footer for the grid

Output: enabled

printGridHTML*
private void printGridHTML ( )

Output: enabled

printGridJS*
private any printGridJS ( )

Output: enabled

printGridRenders*
private printGridRenders ( )

print out custom render function

Output: enabled

printJsonData
public void printJsonData ( )

Output: enabled

setGridCol
public setGridCol ( required string header, required numeric width, required string name, numeric length, string mapping="[runtime expression]", string id="[runtime expression]", string css="", boolean sortable="true", boolean hidden="false", string align="left", string render="", string detailRender="" )

Initialze each column to be displayed in the Ext Grid component

Output: suppressed
Parameters:
   header: string, required, header - sets the header for a column
   width: numeric, required, width - sets the width of the column in pixels.
   name: string, required, name - sets the dataIndex for a column - correlates to the column within the query.
   length: numeric, optional, length - Specify the length of the string for the column. If value exceeds length, it is cut and appended with '...'
   mapping: string, optional, mapping - maps name of column to the column within the query
   id: string, optional, id - sets the identifier of the column for use in applying custom css that follows the patter .x-grid-col-id
   css: string, optional, css - specify custom css for the column
   sortable: boolean, optional, sortable - specify if the column is sortable
   hidden: boolean, optional, hidden - specify if the column is hidden
   align: string, optional, align - specify the alignment of text within the column, defaults to left
   render: string, optional, render - specify a custom rendering function for the column
   detailRender: string, optional, detailRender - specify a custom rendering function for the column when in detailed view

setGridQuery
public setGridQuery ( required query query, numeric totalcount="[runtime expression]", string stripTagsColumns="", string stripMode="html", string stripTags="" )

Submit query object for grid display

Output: suppressed
Parameters:
   query: query, required, query - Query object containing records for display in grid
   totalcount: numeric, optional, totalcount - specify the total count
   stripTagsColumns: string, optional, stripTagsColumns - specify column list in the query object to strip any HTML tags from the value.
   stripMode: string, optional, stripMode - A string, html or disallow or allow. If html, then all HTML is removed from values, otherwise, specifies if the list of tags in the stripTags attribute is a list of tags to allow or disallow.
   stripTags: string, optional, stripTags

StripHTML
StripHTML ( required STR )

Output: enabled
Parameters:
   STR: any, required, STR

stripTags
stripTags ( required STRIPMODE, required MYTAGS, required MYSTRING )

Output: enabled
Parameters:
   STRIPMODE: any, required, STRIPMODE
   MYTAGS: any, required, MYTAGS
   MYSTRING: any, required, MYSTRING

validateJSON*
private boolean validateJSON ( string doc, string schema, string errorVar="jsonSchemaErrors", boolean stopOnError="true", any _doc, any _schema, string _item="root" )

I validate a JSON document against a JSON schema

Output: enabled
Parameters:
   doc: string, optional, doc
   schema: string, optional, schema
   errorVar: string, optional, errorVar
   stopOnError: boolean, optional, stopOnError
   _doc: any, optional, _doc
   _schema: any, optional, _schema
   _item: string, optional, _item