|
ColdBox Platform v3.8.0 | ||||
FRAMES |
WEB-INF.cftags.componentcoldbox.system.plugins.HTMLHelper
public class 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
Constructor Summary | |
---|---|
init()
|
Method Summary | |
---|---|
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 |
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 |
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'])
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='false'], [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 WEB-INF.cftags.component |
---|
None
|
Constructor Detail |
---|
public init()
Method Detail |
---|
public any addAsset(any asset, [boolean sendToHeader='true'], [boolean async='false'], [boolean defer='false'])
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 contentasync
- 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)public any addJSContent(any content, [boolean addToHeader='false'])
content
- The content to render outaddToHeader
- Send to header or return contentpublic any addStyleContent(any content, [boolean addToHeader='false'])
content
- The content to render outaddToHeader
- Send to header or return contentpublic any anchor(any name, [any text=''], [struct data='[runtime expression]'])
name
- The name of the anchortext
- The text of the linkdata
- A structure that will add data-{key} elements to the HTML controlprivate void arrayToTable(any data, [string includes=''], [string excludes=''], any buffer)
data
- The array to convert into a tableincludes
- The columns to include in the renderingexcludes
- The columns to exclude in the renderingbuffer
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]'])
src
- The source URL or array or list of URL's to create audio tags forautoplay
- Whether or not to start playing the audio as soon as it cancontrols
- Whether or not to show controls on the audio playerloop
- Whether or not to loop the audio over and over againpreLoad
- If true, the audio will be loaded at page load, and ready to run. Ignored if 'autoplay' is presentnoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truename
- The name tagdata
- A structure that will add data-{key} elements to the HTML controlpublic any autoDiscoveryLink([string type='RSS'], [any href], [any rel='alternate'], [any title=''], [struct data='[runtime expression]'])
type
- Type of feed: RSS or ATOM or Custom Typehref
- The href link to discoverrel
- The rel attributetitle
- The title attributedata
- A structure that will add data-{key} elements to the HTML controlprivate any bindValue([any args])
args
public any br([numeric count='1'])
count
- The number of breakspublic 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=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabled button or not?type
- The type of button to create: button, reset or submitwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultdata
- A structure that will add data-{key} elements to the HTML controllabelClass
- The class to be applied to the labelpublic any canvas(string id, [string width=''], [string height=''], [struct data='[runtime expression]'])
id
- The id of the canvaswidth
- The width tagheight
- The height tagdata
- A structure that will add data-{key} elements to the HTML controlpublic 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=''])
name
- The name of the fieldvalue
- The value of the field, defaults to truedisabled
- Disabledchecked
- Checkedwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributepublic any docType([string type='html5'])
type
- The doctype to generate, we default to HTML 5public 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=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributepublic any endFieldset()
public any endForm()
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]'])
entity
- The entity binded to this controlgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultfieldwrapper
- The wrapper tag to use around the field items. Empty by defaultlabelwrapper
- The wrapper tag to use around the label items. Empty by defaultlabelClass
- The class to be applied to the labeltextareas
- A list of property names that you want as textareasbooleanSelect
- If a boolean is detected a dropdown is generated, if false, then radio buttonsshowRelations
- If true it will show relation tables for one to one and one to manymanytoone
- 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'}public any fileField([string name=''], [string value=''], [boolean disabled='false'], [boolean readonly='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelprivate any flattenAttributes(struct target, [any excludes=''], any buffer)
target
excludes
buffer
public any heading(string title, [numeric size='1'])
title
- The header contentsize
- The header size: h1, h2, hxpublic any hiddenField([string name=''], [string value=''], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''], [any bind=''], [any bindProperty=''])
name
- The name of the fieldvalue
- The value of the fieldwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributepublic any href([any href=''], [any text=''], [any queryString=''], [any title=''], [any target=''], [boolean ssl='false'], [boolean noBaseURL='false'], [struct data='[runtime expression]'])
href
- Where to link to, this can be an action, absolute, etctext
- The text of the linkqueryString
- The query string to append, if needed.title
- The title attributetarget
- The target of the href linkssl
- If true, it will change http to https if found in the ses base url ONLYnoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truedata
- A structure that will add data-{key} elements to the HTML controlpublic any imageButton(string src, [string name=''], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
src
- The image srcname
- The name of the fielddisabled
- Disabledwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelpublic 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]'])
src
- The source URL to link toalt
- The alt tagclass
- The class tagwidth
- The width tagheight
- The height tagtitle
- The title tagrel
- The rel tagname
- The name tagnoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truedata
- A structure that will add data-{key} elements to the HTML controlpublic 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]'])
type
- The type of input field to createname
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledchecked
- Checkedreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributedata
- A structure that will add data-{key} elements to the HTML controlpublic any label(string field, [string content=''], [string wrapper=''], [struct data='[runtime expression]'], [string class=''])
field
- The for who attributecontent
- The label content. If not passed the field is usedwrapper
- The wrapper tag to use around the tag. Empty by defaultdata
- A structure that will add data-{key} elements to the HTML controlclass
- The class to be applied to the labelpublic 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]'])
href
- The href link to link torel
- The rel attributetype
- The type attributetitle
- The title attributemedia
- The media attributenoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truecharset
- The charset to add, defaults to utf-8sendToHeader
- Send to the header via htmlhead by default, else it returns the contentdata
- A structure that will add data-{key} elements to the HTML controlprivate any makePretty([any text])
text
public any meta(any name, [any content=''], [string type='name'], [boolean sendToHeader='false'])
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 attributetype
- Either ''name'' or ''equiv'' which produces http-equiv instead of the namesendToHeader
- Send to the header via htmlhead by default, else it returns the contentpublic any nbs([numeric count='1'])
count
- The number of spacesprivate any normalizeID([any args])
args
public any ol(any values='', [string column=''])
values
- An array of values or list of valuescolumn
- If the values is a query, this is the name of the column to get the data from to create the listpublic any onMissingMethod(any missingMethodName, any missingMethodArguments)
missingMethodName
- missing method namemissingMethodArguments
- missing method argumentspublic any options([any values], [any column=''], [any nameColumn=''], [any selectedIndex='0'], [any selectedValue=''])
values
- The values array, list, or query to build options forcolumn
- If using a query or array of objects the column to display as value and namenameColumn
- If using a query or array of objects, the name column to display, if not passed defaults to the value columnselectedIndex
- selected index(s) if any. So either one or a list of indexesselectedValue
- selected value(s) if any. So either one or a list of valuesprivate boolean passIncludeExclude(string value, [string includes=''], [string excludes=''])
value
- The value to testincludes
- The columns to include in the renderingexcludes
- The columns to exclude in the renderingpublic 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=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributeprivate any prepareBaseLink([any noBaseURL], [any src])
noBaseURL
src
private void queryToTable(any data, [string includes=''], [string excludes=''], any buffer)
data
- The query to convert into a tableincludes
- The columns to include in the renderingexcludes
- The columns to exclude in the renderingbuffer
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=''])
name
- The name of the fieldvalue
- The value of the field, defaults to truedisabled
- Disabledchecked
- Checkedwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributepublic any resetButton([string name=''], [string value='Reset'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelpublic 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=''])
name
- The name of the fieldoptions
- The value for the options, usually by calling our options() methodcolumn
- If using a query or array of objects the column to display as value and namenameColumn
- If using a query or array of objects, the name column to display, if not passed defaults to the value columnselectedIndex
- selected indexselectedValue
- selected value if anybind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributedisabled
- Disabled button or not?multiple
- multiple button or not?wrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultdata
- A structure that will add data-{key} elements to the HTML controllabelClass
- The class to be applied to the labelpublic string slugify(string str, [numeric maxLength='0'], [string allow=''])
str
- The string to slugifymaxLength
- The maximum number of characters for the slugallow
- a regex safe list of additional characters to allowpublic any startFieldset([string legend=''], [struct data='[runtime expression]'])
legend
- The legend to use (if any)data
- A structure that will add data-{key} elements to the HTML controlpublic any startForm([string action=''], [string name=''], [string method='POST'], [boolean multipart='false'], [boolean ssl='false'], [boolean noBaseURL='false'], [struct data='[runtime expression]'])
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 formname
- The name of the form tagmethod
- The HTTP method of the form: POST or GETmultipart
- Set the multipart encoding type on the formssl
- If true, it will change http to https if found in the ses base url ONLYnoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truedata
- A structure that will add data-{key} elements to the HTML controlpublic any submitButton([string name=''], [string value='Submit'], [boolean disabled='false'], [string wrapper=''], [string groupWrapper=''], [string label=''], [string labelwrapper=''], [string labelClass=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledwrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelpublic any table(any data, [string includes=''], [string excludes=''], [string name=''])
data
- The query or array of structures or array of entities to convert into a tableincludes
- The columns to include in the renderingexcludes
- The columns to exclude in the renderingname
- The name tagpublic any tag(string tag, [string content=''], [struct data='[runtime expression]'])
tag
- The tag to generatecontent
- The content of the tagdata
- A structure that will add data-{key} elements to the HTML controlpublic 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]'])
name
- The name of the textareacols
- The number of columnsrows
- The number of rowsvalue
- The value of the textareadisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this control, the value comes by convention from the name attributebindProperty
- The property to use for the value, by convention we use the name attributedata
- A structure that will add data-{key} elements to the HTML controlpublic 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=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributeprivate any toHTMLList(string tag, any values='', [string column=''], [struct data='[runtime expression]'])
tag
- The list tag typevalues
- An array of values or list of valuescolumn
- If the values is a query, this is the name of the column to get the data from to create the listdata
- A structure that will add data-{key} elements to the HTML controlpublic any ul(any values='', [string column=''])
values
- An array of values or list of valuescolumn
- If the values is a query, this is the name of the column to get the data from to create the listpublic 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=''])
name
- The name of the fieldvalue
- The value of the fielddisabled
- Disabledreadonly
- Readonlywrapper
- The wrapper tag to use around the tag. Empty by defaultgroupWrapper
- The wrapper tag to use around the tag and label. Empty by defaultlabel
- If Passed we will prepend a label taglabelwrapper
- The wrapper tag to use around the label. Empty by defaultlabelClass
- The class to be applied to the labelbind
- The entity binded to this controlbindProperty
- The property to use for the value, by convention we use the name attributepublic 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]'])
src
- The source URL or array or list of URL's to create video tags forwidth
- The width tagheight
- The height tagposter
- The URL of the image when video is unavailableautoplay
- Whether or not to start playing the video as soon as it cancontrols
- Whether or not to show controls on the video playerloop
- Whether or not to loop the video over and over againpreload
- If true, the video will be loaded at page load, and ready to run. Ignored if 'autoplay' is presentnoBaseURL
- Defaults to false. If you want to NOT append a request's ses or html base url then set this argument to truename
- The name tagdata
- A structure that will add data-{key} elements to the HTML controlprivate any wrapTag([any buffer], [any tag], [any end='false'])
buffer
tag
end
|
ColdBox Platform v3.8.0 | ||||
FRAMES |