coldbox.system.core.dynamic

Class HTMLHelper

lucee.Component
    extended by coldbox.system.FrameworkSupertype
      extended by coldbox.system.core.dynamic.HTMLHelper

A cool utility that helps you when working with HTML, from creating doc types, to managing your js/css assets, to rendering tables and lists from data

Class Attributes:
  • singleton
  •  
  • output : false
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init(any controller)
    Method Summary
    void $htmlhead(string content)
         Facade to cfhtmlhead.
    any addAsset(any asset, [boolean sendToHeader='true'], [boolean async='false'], [boolean defer='false'])
         Add a js/css asset(s) to the html head section.
    any addJSContent(any content, [boolean addToHeader='false'])
         Open and close HTML5 javascript tags so you can easily just add content.
    any addStyleContent(any content, [boolean addToHeader='false'])
         Open and close xhtml style tags so you can easily just add content.
    any anchor(any name, [any text=''], [struct data='[runtime expression]'])
         Create an anchor tag.
    private void arrayToTable(any data, [string includes=''], [string excludes=''], any buffer)
         Convert a table out of an array.
    any audio(any src, [boolean autoplay='false'], [boolean controls='true'], [boolean loop='false'], [boolean preLoad='false'], [boolean noBaseURL='false'], [string name=''], [struct data='[runtime expression]'])
         Create an HTML 5 audio tag.
    any autoDiscoveryLink([string type='RSS'], [any href], [any rel='alternate'], [any title=''], [struct data='[runtime expression]'])
         Creates auto discovery links for RSS and ATOM feeds.
    private any bindValue([any args])
         Bind entity values.
    any br([numeric count='1'])
         Generate line breaks.
    any button([string name=''], [string value=''], [boolean disabled='false'], [string type='button'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [struct data='[runtime expression]'], [string labelClass=''])
         Render out a button.
    any canvas(string id, [string width=''], [string height=''], [struct data='[runtime expression]'])
         Create a canvas tag.
    any checkBox([string name=''], [string value='true'], [boolean disabled='false'], [boolean checked='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a checkbox.
    any docType([string type='html5'])
         Render a doctype by type name: xhtml11,xhtml1-strict,xhtml-trans,xthml-frame,html5,html4-strict,html4-trans,html4-frame.
    void elixir(string fileName, [string buildDirectory='build'], [boolean sendToHeader='true'], [boolean async='false'], [boolean defer='false'])
         Adds the versioned path for an asset to the view.
    string elixirPath(string fileName, [string buildDirectory='build'])
         Finds the versioned path for an asset.
    any emailField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out an email field.
    any endFieldset()
         End a fieldset tag.
    any endForm()
         End a form tag.
    any entityFields(any entity, [string groupWrapper=''], [any fieldwrapper=''], [any labelwrapper=''], [string labelClass=''], [any textareas=''], [boolean booleanSelect='true'], [boolean showRelations='true'], [struct manytoone='[runtime expression]'], [struct manytomany='[runtime expression]'])
         Create fields based on entity properties.
    any fileField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
         Render out a file field.
    private any flattenAttributes(struct target, [any excludes=''], any buffer)
         flatten a struct of attributes to strings.
    private any getColumnArray(query qry, string columnName)
         Returns an array of the values.
    any heading(string title, [numeric size='1'])
         Generate header tags.
    any hiddenField([string name=''], [string value=''], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a hidden field.
    any href([any href=''], [any text=''], [any queryString=''], [any title=''], [any target=''], [boolean ssl='false'], [boolean noBaseURL='false'], [struct data='[runtime expression]'])
         Create href tags, using the SES base URL or not.
    any imageButton(string src, [string name=''], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
         Render out a image button.
    any img(any src, [string alt=''], [string class=''], [string width=''], [string height=''], [string title=''], [string rel=''], [string name=''], [boolean noBaseURL='false'], [struct data='[runtime expression]'])
         Create image tags using the SES base URL or not.
    any inputField([string type='text'], [string name=''], [string value=''], [boolean disabled='false'], [boolean checked='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''], [struct data='[runtime expression]'])
         Create an input field using some cool tags and features.
    any label(string field, [string content=''], [string wrapper=''], [struct data='[runtime expression]'], [string class=''])
         Render a label tag.
    any link(any href, [any rel='stylesheet'], [any type='text/css'], [any title=''], [any media=''], [boolean noBaseURL='false'], [any charset='UTF-8'], [boolean sendToHeader='false'], [struct data='[runtime expression]'])
         Create link tags, using the SES base URL or not.
    private any makePretty([any text])
         make pretty text.
    any meta(any name, [any content=''], [string type='name'], [boolean sendToHeader='false'], [any property=''])
         Helps you generate meta tags.
    any nbs([numeric count='1'])
         Generate non-breaking spaces ( ).
    private any normalizeID([any args])
         Normalize ID with name arguments.
    any ol(any values='', [string column=''])
         Create ordered lists according to passed in values and arguments, compressed HTML.
    any onMissingMethod(any missingMethodName, any missingMethodArguments)
         Proxy calls to provided element.
    any options([any values], [any column=''], [any nameColumn=''], [any selectedIndex='0'], [any selectedValue=''])
         Render out options.
    private boolean passIncludeExclude(string value, [string includes=''], [string excludes=''])
         checks if a list include exclude check passes.
    any passwordField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a password field.
    private any prepareBaseLink([any noBaseURL], [any src])
         Prepare a base link.
    private void queryToTable(any data, [string includes=''], [string excludes=''], any buffer)
         Convert a table out of an array of structures.
    any radioButton([string name=''], [string value='true'], [boolean disabled='false'], [boolean checked='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a radio button.
    any resetButton([string name=''], [string value='Reset'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
         Render out a reset button.
    any select([string name=''], [any options=''], [string column=''], [string nameColumn=''], [numeric selectedIndex='0'], [string selectedValue=''], [any bind=''], [any bindProperty=''], [boolean disabled='false'], [boolean multiple='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [struct data='[runtime expression]'], [string labelClass=''])
         Render out a select tag.
    string slugify(string str, [numeric maxLength='0'], [string allow=''])
         Create a URL safe slug from a string.
    any startFieldset([string legend=''], [struct data='[runtime expression]'])
         Create a fieldset tag with or without a legend.
    any startForm([string action=''], [string name=''], [string method='POST'], [boolean multipart='false'], [boolean ssl], [boolean noBaseURL='false'], [struct data='[runtime expression]'])
         Create cool form tags.
    any submitButton([string name=''], [string value='Submit'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
         Render out a submit button.
    any table(any data, [string includes=''], [string excludes=''], [string name=''])
         Convert a table out of data (either a query or array of structures or array of entities).
    any tag(string tag, [string content=''], [struct data='[runtime expression]'])
         Surround content with a tag.
    any textArea([string name=''], [numeric cols], [numeric rows], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''], [struct data='[runtime expression]'])
         Render out a textarea.
    any textField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a text field.
    private any toHTMLList(string tag, any values='', [string column=''], [struct data='[runtime expression]'])
         Convert a sent in tag type to an HTML list.
    any ul(any values='', [string column=''])
         Create un-ordered lists according to passed in values and arguments, compressed HTML.
    any urlfield([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
         Render out a URL field.
    any video(any src, [string width=''], [string height=''], [string poster=''], [boolean autoplay='false'], [boolean controls='true'], [boolean loop='false'], [boolean preload='false'], [boolean noBaseURL='false'], [string name=''], [struct data='[runtime expression]'])
         Create an HTML 5 video tag.
    private any wrapTag([any buffer], [any tag], [any end='false'])
     
    Methods inherited from class coldbox.system.FrameworkSupertype
    announceInterception, getCache, getController, getDatasource, getInstance, getInterceptor, getModel, getModuleConfig, getModuleSettings, getMyPlugin, getPlugin, getRenderer, getRequestCollection, getRequestContext, getSetting, getSettingStructure, includeUDF, loadApplicationHelpers, locateDirectoryPath, locateFilePath, persistVariables, populateModel, renderExternalView, renderLayout, renderView, runEvent, setController, setNextEvent, setSetting, settingExists
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init(any controller)

    Parameters:
    controller

    Method Detail

    $htmlhead

    public void $htmlhead(string content)

    Facade to cfhtmlhead

    Parameters:
    content - The content to send to the head

    addAsset

    public any addAsset(any asset, [boolean sendToHeader='true'], [boolean async='false'], [boolean defer='false'])

    Add a js/css asset(s) to the html head section. You can also pass in a list of assets via the asset argument to try to load all of them. You can also make this method return the string that will be sent to the header instead.

    Overrides:
    addAsset in class FrameworkSupertype
    Parameters:
    asset - The asset(s) to load, only js or css files. This can also be a comma delimmited list.
    sendToHeader - Send to the header via htmlhead by default, else it returns the content
    async - HTML5 JavaScript argument: Specifies that the script is executed asynchronously (only for external scripts)
    defer - HTML5 JavaScript argument: Specifies that the script is executed when the page has finished parsing (only for external scripts)

    addJSContent

    public any addJSContent(any content, [boolean addToHeader='false'])

    Open and close HTML5 javascript tags so you can easily just add content

    Parameters:
    content - The content to render out
    addToHeader - Send to header or return content

    addStyleContent

    public any addStyleContent(any content, [boolean addToHeader='false'])

    Open and close xhtml style tags so you can easily just add content

    Parameters:
    content - The content to render out
    addToHeader - Send to header or return content

    anchor

    public any anchor(any name, [any text=''], [struct data='[runtime expression]'])

    Create an anchor tag

    Parameters:
    name - The name of the anchor
    text - The text of the link
    data - A structure that will add data-{key} elements to the HTML control

    arrayToTable

    private void arrayToTable(any data, [string includes=''], [string excludes=''], any buffer)

    Convert a table out of an array

    Parameters:
    data - The array to convert into a table
    includes - The columns to include in the rendering
    excludes - The columns to exclude in the rendering
    buffer

    audio

    public any audio(any src, [boolean autoplay='false'], [boolean controls='true'], [boolean loop='false'], [boolean preLoad='false'], [boolean noBaseURL='false'], [string name=''], [struct data='[runtime expression]'])

    Create an HTML 5 audio tag

    Parameters:
    src - The source URL or array or list of URL's to create audio tags for
    autoplay - Whether or not to start playing the audio as soon as it can
    controls - Whether or not to show controls on the audio player
    loop - Whether or not to loop the audio over and over again
    preLoad - If true, the audio will be loaded at page load, and ready to run. Ignored if 'autoplay' is present
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    name - The name tag
    data - A structure that will add data-{key} elements to the HTML control

    autoDiscoveryLink

    public any autoDiscoveryLink([string type='RSS'], [any href], [any rel='alternate'], [any title=''], [struct data='[runtime expression]'])

    Creates auto discovery links for RSS and ATOM feeds.

    Parameters:
    type - Type of feed: RSS or ATOM or Custom Type
    href - The href link to discover
    rel - The rel attribute
    title - The title attribute
    data - A structure that will add data-{key} elements to the HTML control

    bindValue

    private any bindValue([any args])

    Bind entity values

    Parameters:
    args

    br

    public any br([numeric count='1'])

    Generate line breaks

    Parameters:
    count - The number of breaks

    button

    public any button([string name=''], [string value=''], [boolean disabled='false'], [string type='button'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [struct data='[runtime expression]'], [string labelClass=''])

    Render out a button. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled button or not?
    type - The type of button to create: button, reset or submit
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    data - A structure that will add data-{key} elements to the HTML control
    labelClass - The class to be applied to the label

    canvas

    public any canvas(string id, [string width=''], [string height=''], [struct data='[runtime expression]'])

    Create a canvas tag

    Parameters:
    id - The id of the canvas
    width - The width tag
    height - The height tag
    data - A structure that will add data-{key} elements to the HTML control

    checkBox

    public any checkBox([string name=''], [string value='true'], [boolean disabled='false'], [boolean checked='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a checkbox. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field, defaults to true
    disabled - Disabled
    checked - Checked
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    docType

    public any docType([string type='html5'])

    Render a doctype by type name: xhtml11,xhtml1-strict,xhtml-trans,xthml-frame,html5,html4-strict,html4-trans,html4-frame

    Parameters:
    type - The doctype to generate, we default to HTML 5

    elixir

    public void elixir(string fileName, [string buildDirectory='build'], [boolean sendToHeader='true'], [boolean async='false'], [boolean defer='false'])

    Adds the versioned path for an asset to the view

    Parameters:
    fileName - The asset path to find relative to the includes convention directory
    buildDirectory - The build directory inside the includes convention directory
    sendToHeader - Send to the header via htmlhead by default, else it returns the content
    async - HTML5 JavaScript argument: Specifies that the script is executed asynchronously (only for external scripts)
    defer - HTML5 JavaScript argument: Specifies that the script is executed when the page has finished parsing (only for external scripts)

    elixirPath

    public string elixirPath(string fileName, [string buildDirectory='build'])

    Finds the versioned path for an asset

    Parameters:
    fileName - The asset path to find relative to the includes convention directory
    buildDirectory - The build directory inside the includes convention directory

    emailField

    public any emailField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out an email field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    endFieldset

    public any endFieldset()

    End a fieldset tag


    endForm

    public any endForm()

    End a form tag


    entityFields

    public any entityFields(any entity, [string groupWrapper=''], [any fieldwrapper=''], [any labelwrapper=''], [string labelClass=''], [any textareas=''], [boolean booleanSelect='true'], [boolean showRelations='true'], [struct manytoone='[runtime expression]'], [struct manytomany='[runtime expression]'])

    Create fields based on entity properties

    Parameters:
    entity - The entity binded to this control
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    fieldwrapper - The wrapper tag to use around the field items. Empty by default
    labelwrapper - The wrapper tag to use around the label items. Empty by default
    labelClass - The class to be applied to the label
    textareas - A list of property names that you want as textareas
    booleanSelect - If a boolean is detected a dropdown is generated, if false, then radio buttons
    showRelations - If true it will show relation tables for one to one and one to many
    manytoone - A structure of data to help with many to one relationships on how they are presented. Possible key values for each key are [valuecolumn='',namecolumn='',criteria={},sortorder=string]. Example: {criteria={productid=1},sortorder='Department desc'}
    manytomany - A structure of data to help with many to one relationships on how they are presented. Possible key values for each key are [valuecolumn='',namecolumn='',criteria={},sortorder=string,selectColumn='']. Example: {criteria={productid=1},sortorder='Department desc'}

    fileField

    public any fileField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])

    Render out a file field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label

    flattenAttributes

    private any flattenAttributes(struct target, [any excludes=''], any buffer)

    flatten a struct of attributes to strings

    Parameters:
    target
    excludes
    buffer

    getColumnArray

    private any getColumnArray(query qry, string columnName)

    Returns an array of the values

    Parameters:
    qry - cf query
    columnName - column name

    heading

    public any heading(string title, [numeric size='1'])

    Generate header tags

    Parameters:
    title - The header content
    size - The header size: h1, h2, hx

    hiddenField

    public any hiddenField([string name=''], [string value=''], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a hidden field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    href

    public any href([any href=''], [any text=''], [any queryString=''], [any title=''], [any target=''], [boolean ssl='false'], [boolean noBaseURL='false'], [struct data='[runtime expression]'])

    Create href tags, using the SES base URL or not

    Parameters:
    href - Where to link to, this can be an action, absolute, etc
    text - The text of the link
    queryString - The query string to append, if needed.
    title - The title attribute
    target - The target of the href link
    ssl - If true, it will change http to https if found in the ses base url ONLY
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    data - A structure that will add data-{key} elements to the HTML control

    imageButton

    public any imageButton(string src, [string name=''], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])

    Render out a image button. Remember that any extra arguments are passed as tag attributes

    Parameters:
    src - The image src
    name - The name of the field
    disabled - Disabled
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label

    img

    public any img(any src, [string alt=''], [string class=''], [string width=''], [string height=''], [string title=''], [string rel=''], [string name=''], [boolean noBaseURL='false'], [struct data='[runtime expression]'])

    Create image tags using the SES base URL or not

    Parameters:
    src - The source URL to link to
    alt - The alt tag
    class - The class tag
    width - The width tag
    height - The height tag
    title - The title tag
    rel - The rel tag
    name - The name tag
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    data - A structure that will add data-{key} elements to the HTML control

    inputField

    public any inputField([string type='text'], [string name=''], [string value=''], [boolean disabled='false'], [boolean checked='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''], [struct data='[runtime expression]'])

    Create an input field using some cool tags and features. Any extra arguments are passed to the tag

    Parameters:
    type - The type of input field to create
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    checked - Checked
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute
    data - A structure that will add data-{key} elements to the HTML control

    label

    public any label(string field, [string content=''], [string wrapper=''], [struct data='[runtime expression]'], [string class=''])

    Render a label tag. Remember that any extra arguments are passed as tag attributes

    Parameters:
    field - The for who attribute
    content - The label content. If not passed the field is used
    wrapper - The wrapper tag to use around the tag. Empty by default
    data - A structure that will add data-{key} elements to the HTML control
    class - The class to be applied to the label

    link

    public any link(any href, [any rel='stylesheet'], [any type='text/css'], [any title=''], [any media=''], [boolean noBaseURL='false'], [any charset='UTF-8'], [boolean sendToHeader='false'], [struct data='[runtime expression]'])

    Create link tags, using the SES base URL or not

    Parameters:
    href - The href link to link to
    rel - The rel attribute
    type - The type attribute
    title - The title attribute
    media - The media attribute
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    charset - The charset to add, defaults to utf-8
    sendToHeader - Send to the header via htmlhead by default, else it returns the content
    data - A structure that will add data-{key} elements to the HTML control

    makePretty

    private any makePretty([any text])

    make pretty text

    Parameters:
    text

    meta

    public any meta(any name, [any content=''], [string type='name'], [boolean sendToHeader='false'], [any property=''])

    Helps you generate meta tags

    Parameters:
    name - A name for the meta tag or an array of struct data to convert to meta tags.Keys [name,content,type]
    content - The content attribute
    type - Either ''name'' or ''equiv'' which produces http-equiv instead of the name
    sendToHeader - Send to the header via htmlhead by default, else it returns the content
    property - The property attribute

    nbs

    public any nbs([numeric count='1'])

    Generate non-breaking spaces ( )

    Parameters:
    count - The number of spaces

    normalizeID

    private any normalizeID([any args])

    Normalize ID with name arguments

    Parameters:
    args

    ol

    public any ol(any values='', [string column=''])

    Create ordered lists according to passed in values and arguments, compressed HTML

    Parameters:
    values - An array of values or list of values
    column - If the values is a query, this is the name of the column to get the data from to create the list

    onMissingMethod

    public any onMissingMethod(any missingMethodName, any missingMethodArguments)

    Proxy calls to provided element

    Parameters:
    missingMethodName - missing method name
    missingMethodArguments - missing method arguments

    options

    public any options([any values], [any column=''], [any nameColumn=''], [any selectedIndex='0'], [any selectedValue=''])

    Render out options. Remember that any extra arguments are passed as tag attributes

    Parameters:
    values - The values array, list, or query to build options for
    column - If using a query or array of objects the column to display as value and name
    nameColumn - If using a query or array of objects, the name column to display, if not passed defaults to the value column
    selectedIndex - selected index(s) if any. So either one or a list of indexes
    selectedValue - selected value(s) if any. So either one or a list of values

    passIncludeExclude

    private boolean passIncludeExclude(string value, [string includes=''], [string excludes=''])

    checks if a list include exclude check passes

    Parameters:
    value - The value to test
    includes - The columns to include in the rendering
    excludes - The columns to exclude in the rendering

    passwordField

    public any passwordField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a password field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    prepareBaseLink

    private any prepareBaseLink([any noBaseURL], [any src])

    Prepare a base link

    Parameters:
    noBaseURL
    src

    queryToTable

    private void queryToTable(any data, [string includes=''], [string excludes=''], any buffer)

    Convert a table out of an array of structures

    Parameters:
    data - The query to convert into a table
    includes - The columns to include in the rendering
    excludes - The columns to exclude in the rendering
    buffer

    radioButton

    public any radioButton([string name=''], [string value='true'], [boolean disabled='false'], [boolean checked='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a radio button. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field, defaults to true
    disabled - Disabled
    checked - Checked
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    resetButton

    public any resetButton([string name=''], [string value='Reset'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])

    Render out a reset button. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label

    select

    public any select([string name=''], [any options=''], [string column=''], [string nameColumn=''], [numeric selectedIndex='0'], [string selectedValue=''], [any bind=''], [any bindProperty=''], [boolean disabled='false'], [boolean multiple='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [struct data='[runtime expression]'], [string labelClass=''])

    Render out a select tag. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    options - The value for the options, usually by calling our options() method
    column - If using a query or array of objects the column to display as value and name
    nameColumn - If using a query or array of objects, the name column to display, if not passed defaults to the value column
    selectedIndex - selected index
    selectedValue - selected value if any
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute
    disabled - Disabled button or not?
    multiple - multiple button or not?
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    data - A structure that will add data-{key} elements to the HTML control
    labelClass - The class to be applied to the label

    slugify

    public string slugify(string str, [numeric maxLength='0'], [string allow=''])

    Create a URL safe slug from a string

    Parameters:
    str - The string to slugify
    maxLength - The maximum number of characters for the slug
    allow - a regex safe list of additional characters to allow

    startFieldset

    public any startFieldset([string legend=''], [struct data='[runtime expression]'])

    Create a fieldset tag with or without a legend.

    Parameters:
    legend - The legend to use (if any)
    data - A structure that will add data-{key} elements to the HTML control

    startForm

    public any startForm([string action=''], [string name=''], [string method='POST'], [boolean multipart='false'], [boolean ssl], [boolean noBaseURL='false'], [struct data='[runtime expression]'])

    Create cool form tags. Any extra argument will be passed as attributes to the form tag

    Parameters:
    action - The event or route action to submit to. This will be inflated using the request's base URL if not a full http URL. If empty, then it is a self-submitting form
    name - The name of the form tag
    method - The HTTP method of the form: POST or GET
    multipart - Set the multipart encoding type on the form
    ssl - If true, it will change http to https if found in the ses base url ONLY, false will remove SSL
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    data - A structure that will add data-{key} elements to the HTML control

    submitButton

    public any submitButton([string name=''], [string value='Submit'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])

    Render out a submit button. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label

    table

    public any table(any data, [string includes=''], [string excludes=''], [string name=''])

    Convert a table out of data (either a query or array of structures or array of entities)

    Parameters:
    data - The query or array of structures or array of entities to convert into a table
    includes - The columns to include in the rendering
    excludes - The columns to exclude in the rendering
    name - The name tag

    tag

    public any tag(string tag, [string content=''], [struct data='[runtime expression]'])

    Surround content with a tag

    Parameters:
    tag - The tag to generate
    content - The content of the tag
    data - A structure that will add data-{key} elements to the HTML control

    textArea

    public any textArea([string name=''], [numeric cols], [numeric rows], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''], [struct data='[runtime expression]'])

    Render out a textarea. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the textarea
    cols - The number of columns
    rows - The number of rows
    value - The value of the textarea
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control, the value comes by convention from the name attribute
    bindProperty - The property to use for the value, by convention we use the name attribute
    data - A structure that will add data-{key} elements to the HTML control

    textField

    public any textField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a text field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    toHTMLList

    private any toHTMLList(string tag, any values='', [string column=''], [struct data='[runtime expression]'])

    Convert a sent in tag type to an HTML list

    Parameters:
    tag - The list tag type
    values - An array of values or list of values
    column - If the values is a query, this is the name of the column to get the data from to create the list
    data - A structure that will add data-{key} elements to the HTML control

    ul

    public any ul(any values='', [string column=''])

    Create un-ordered lists according to passed in values and arguments, compressed HTML

    Parameters:
    values - An array of values or list of values
    column - If the values is a query, this is the name of the column to get the data from to create the list

    urlfield

    public any urlfield([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])

    Render out a URL field. Remember that any extra arguments are passed as tag attributes

    Parameters:
    name - The name of the field
    value - The value of the field
    disabled - Disabled
    readonly - Readonly
    wrapper - The wrapper tag to use around the tag. Empty by default
    groupWrapper - The wrapper tag to use around the tag and label. Empty by default
    label - If Passed we will prepend a label tag
    labelwrapper - The wrapper tag to use around the label. Empty by default
    labelClass - The class to be applied to the label
    bind - The entity binded to this control
    bindProperty - The property to use for the value, by convention we use the name attribute

    video

    public any video(any src, [string width=''], [string height=''], [string poster=''], [boolean autoplay='false'], [boolean controls='true'], [boolean loop='false'], [boolean preload='false'], [boolean noBaseURL='false'], [string name=''], [struct data='[runtime expression]'])

    Create an HTML 5 video tag

    Parameters:
    src - The source URL or array or list of URL's to create video tags for
    width - The width tag
    height - The height tag
    poster - The URL of the image when video is unavailable
    autoplay - Whether or not to start playing the video as soon as it can
    controls - Whether or not to show controls on the video player
    loop - Whether or not to loop the video over and over again
    preload - If true, the video will be loaded at page load, and ready to run. Ignored if 'autoplay' is present
    noBaseURL - Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to true
    name - The name tag
    data - A structure that will add data-{key} elements to the HTML control

    wrapTag

    private any wrapTag([any buffer], [any tag], [any end='false'])

    Parameters:
    buffer
    tag
    end