Component ext (Ext.CFC)


methods: boolFormat, decodeJSON*, encodeJSON*, init, initGrid, initGridFooter, initGridHeader, printGrid, printGridBuilder*, printGridColumnModel*, printGridDataStore*, printGridEditFormOptions*, printGridFooter*, printGridHeader*, printGridHTML*, printGridJS*, printGridRenders*, printInitJS*, printJsonData, setComboProperties, setGridCol, setGridColEditable, setGridGrouping, setGridQuery, setGridRowBody, StripHTML, stripTags, validateJSON*
* - private method

boolFormat
boolFormat ( required VAL )

Output: enabled
Parameters:
   VAL: any, required, VAL

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 ( string path )

Initialize CFC parameters

Output: suppressed
Parameters:
   path: string, optional, path - Web path to Ext JS folder

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 selectable="true", boolean singleSelect="true", boolean detailedView="false", boolean showDetailedView="false", boolean collapsible="true", boolean frame="false" )

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
   selectable: boolean, optional, selectable - specify if a row can be selected
   singleSelect: boolean, optional, singleSelect - specify if only one 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.
   collapsible: boolean, optional, collapsible - Specify if the Grid can be collapsed
   frame: boolean, optional, frame - True to render the panel with custom rounded borders, false to render with plain 1px square borders

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

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
   detailsButtonText: string, optional, detailsButtonText - Specify the text for the detail button

initGridHeader
public initGridHeader ( addrecord )

Add a header toolbar with optional links to add/delete records, and refresh the grid

Output: suppressed
Parameters:
   addrecord: any, optional, addrecord

printGrid
public any printGrid ( )

output Ext grid JS and HTML to browser

Output: enabled

printGridBuilder*
private printGridBuilder ( )

prints out the Grid to the DOM

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

printGridEditFormOptions*
private printGridEditFormOptions ( required i )

prints out the editform options for the grid

Output: enabled
Parameters:
   i: any, required, i - Specify the column row

printGridFooter*
private printGridFooter ( )

print out the footer for the grid

Output: enabled

printGridHeader*
private printGridHeader ( )

print out the header 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

printInitJS*
private void printInitJS ( )

Output: enabled

printJsonData
public void printJsonData ( )

Output: enabled

setComboProperties
setComboProperties ( )

Output: enabled

setGridCol
public setGridCol ( required string header, required numeric width, required string name, string type="auto", string dateFormat="m/d/Y", numeric length, string mapping="[runtime expression]", string id="[runtime expression]", string css="", boolean sortable="true", boolean hidden="false", string align="left", string renderer="" )

Initialize 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.
   type: string, optional, type - Specify the datatype using the following strings: auto (Default, implies no conversion), string, int, float, boolean,date
   dateFormat: string, optional, dateFormat - A format String for the Date.parseDate function (the type argument must be date)
   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
   renderer: string, optional, renderer - specify a custom rendering function for the column

setGridColEditable
public setGridColEditable ( required string name, required string type, boolean allowBlank="true", string blankText="This field is required", string applyTo, string class="", string containerClass="", boolean disabled="false", string disabledClass, string emptyClass, string emptyText, string fieldClass, string fieldLabel, string focusClass, string maxLength, numeric minLength, string data, string fields, string displayField, string transform, maxValue, minValue, allowNegative, string format )

Initialize each column to be editable inline

Output: suppressed
Parameters:
   name: string, required, name - Specify the name of the column to be editable inline
   type: string, required, type - Specify the type of editor, must be either: textfield,textarea,combo,check,html,radio,number,date,time
   allowBlank: boolean, optional, allowBlank - False to validate that the value length > 0
   blankText: string, optional, blankText - Error text to display if the allow blank validation fails (defaults to 'This field is required')
   applyTo: string, optional, applyTo
   class: string, optional, class - An optional extra CSS class that will be added to this component's Element (defaults to ''). This can be useful for adding customized styles to the component or any of its children using standard CSS rules
   containerClass: string, optional, containerClass - An optional extra CSS class that will be added to this component's container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules.
   disabled: boolean, optional, disabled - True to disable the field.
   disabledClass: string, optional, disabledClass - CSS class added to the component when it is disabled (defaults to 'x-item-disabled').
   emptyClass: string, optional, emptyClass - The CSS class to apply to an empty field to style the emptyText (defaults to 'x-form-empty-field'). This class is automatically added and removed as needed depending on the current field value.
   emptyText: string, optional, emptyText - The default text to display in an empty field (defaults to null).
   fieldClass: string, optional, fieldClass - The default CSS class for the field (defaults to 'x-form-field')
   fieldLabel: string, optional, fieldLabel - The label text to display next to this field (defaults to '')
   focusClass: string, optional, focusClass - The CSS class to use when the field receives focus (defaults to 'x-form-focus')
   maxLength: string, optional, maxLength - Maximum input field length allowed (defaults to Number.MAX_VALUE)
   minLength: numeric, optional, minLength - Minimum input field length required (defaults to 0)
   data: string, optional, data - Combobox field only: Pass inline data to use for the combobox options.
   fields: string, optional, fields - Combobox field only: Pass list of fields
   displayField: string, optional, displayField - Combobox field only: Name of field to display
   transform: string, optional, transform - Combobox field only: The id, DOM node or element of an existing select to convert to a ComboBox
   maxValue: any, optional, maxValue - Numeric field only:
   minValue: any, optional, minValue - Numeric field only:
   allowNegative: any, optional, allowNegative
   format: string, optional, format - Date field only:

setGridGrouping
public setGridGrouping ( required string colname, boolean startCollapsed="false" )

If grid is to have grouping you must call this function and set the name equal to one of the column's' name

Output: suppressed
Parameters:
   colname: string, required, colname
   startCollapsed: boolean, optional, startCollapsed

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

setGridRowBody
public setGridRowBody ( required string colname )

True to add a second TR element per row that can be used to provide a row body that spans beneath the data row

Output: suppressed
Parameters:
   colname: string, required, colname - Specify the query column that is be contained in the row body

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