Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Fields and methods of the helma.Html and helma.Html.Tablewriter classes.

To use this optional module, its repository needs to be added to the application, for example by calling app.addRepository('modules/helma/Html.js')
helma Html()
Creates a new instance of helma.Html
methods
  • tag(name, attr)
  • dropDown(param, options, selectedValue, firstOption)
  • map(name, param)
  • table(headers, data, param)
helma Html.TableWriter(numberOfColumns, attr)
Creates a new TableWriter instance
parameters
Number numberOfColumns The number of columns in the table
Object attr An object containing attributes to use when rendering the single table elements. For a description see {@link #table}.
methods
properties
Boolean helma.Html.TableWriter. writeHeader
If set to true the first row of the table data is rendered using <th> tags (defaults to false).
Boolean helma.Html.TableWriter. writeString
If set to true the TableWriter returns the rendered table as string, otherwise the table is written directly to response, which is the default.
Methods
helma. Html.renderMarkupPart(name, start, end, attr)
Static helper method that renders an arbitrary markup part.
parameters
String name The element's name
String start Prefix of each rendered element
String end Suffix of each rendered element
Object attr Optional element attributes
helma. Html.isSelected(value, selectedValue)
Static helper method used in helma.Html.checkBox and helma.Html.dropDown to check if a current value matches against one or more selected values passed as argument
parameters
String value The current value to check
String, Array selectedValue Either a single value to check against the current value, or an array containing values.
returns
True in case the value is among the selected values, false otherwise
helma.Html. openTag(name, attr)
Renders the opening tag of an arbitrary x/html tag
parameters
String name The tag name
Object attr An optional object containing element attributes
helma.Html. openTagAsString(name, attr)
Returns the opening tag of an arbitrary x/html tag
parameters
String name The tag name
Object attr An optional object containing element attributes
returns
The rendered x/html opening tag
see
helma.Html. closeTag(name)
Renders the closing tag of an arbitrary x/html tag
parameters
String name The tag name
helma.Html. closeTagAsString(name)
Returns the closing tag of an arbitray x/html element
parameters
String name The tag name
returns
The rendered closing tag
see
helma.Html. tag(name, attr)
Renders an empty arbitrary x/html tag ("contentless tag")
parameters
String name The tag name
Object attr An optional object containing tag attributes
helma.Html. tagAsString(name, attr)
Returns an empty arbitrary x/html tag ("contentless tag")
parameters
String name The tag name
Object attr An optional object containing tag attributes
returns
The rendered element
see
helma.Html. element(name, str, attr)
Renders an arbitrary x/html element
parameters
String name The element name
String str The content of the element
Object attr An optional object containing element attributes
helma.Html. elementAsString(name, str, attr)
Return an arbitrary x/html element
parameters
String name The element name
String str The content of the element
Object attr An optional object containing element attributes
returns
The rendered element
see
helma.Html. link(attr, text)
Renders an x/html link tag
parameters
Object attr An object containing the link attributes
String text The text to appear as link
helma.Html. linkAsString(attr, text)
Returns a rendered x/html link tag
parameters
Object attr An object containing the link attributes
String text The text to appear as link
returns
The rendered link tag
see
helma.Html. hidden(param)
Renders an x/html input tag of type "hidden"
parameters
Object param An object containing the tag attributes
helma.Html. hiddenAsString(attr)
Returns a rendered x/html input tag of type "hidden"
parameters
Object attr An object containing the tag attributes
returns
The rendered input element
see
helma.Html. input(param)
Renders an x/html text input tag
parameters
Object param An object containing the tag attributes
helma.Html. inputAsString(attr)
Returns a rendered x/html text input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered text input tag
see
helma.Html. textArea(param)
Renders an x/html textarea tag
parameters
Object param An object containing the tag attributes
helma.Html. textAreaAsString(attr)
Returns a rendered x/html textarea tag
parameters
Object attr An object containing the tag attributes
returns
The rendered textarea tag
see
helma.Html. checkBox(param)
Renders an x/html checkbox input tag
parameters
Object param An object containing the tag attributes
helma.Html. checkBoxAsString(attr)
Returns a rendered x/html checkbox input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered checkbox tag
see
helma.Html. radioButton(param)
Renders an x/html radiobutton input tag
parameters
Object param An object containing the tag attributes
helma.Html. radioButtonAsString(attr)
Returns a rendered x/html radio input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered element
see
helma.Html. submit(param)
Renders an x/html submit input tag
parameters
Object param An object containing the tag attributes
helma.Html. submitAsString(attr)
Returns a rendered x/html submit input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered submit input tag
see
helma.Html. button(param)
Renders an x/html button input tag
parameters
Object param An object containing the tag attributes
helma.Html. buttonAsString(param)
Returns a rendered x/html button input tag
parameters
Object param An object containing the tag attributes
returns
The rendered button input tag
see
helma.Html. dropDown(param, options, selectedValue, firstOption)
Renders a x/html drop down select box
parameters
Object param An object containing the tag attributes
Array options Either an array of strings, an array with several {value: v, display: d} objects, or a collection of ["value", "display"] arrays in an array
String selectedValue The value to pre-select
String firstOption An optional first option to display in the select box (this option will always have no value)
helma.Html. dropDownAsString(param, options, selectedValue, firstOption)
Returns a rendered x/html drop down select box
parameters
Object param An object containing the tag attributes
Array options Either an array of strings, an array with several {value: v, display: d} objects, or a collection of ["value", "display"] arrays in an array
String selectedValue The value to pre-select
String firstOption An optional first option to display in the select box (this option will always have no value)
returns
The rendered drop down select box
see
helma.Html. map(name, param)
Renders an image map based on an array containing the map parameters.
parameters
String name The name of the image map
Array param An array containing objects, where each of them contains the attributes for a single image map entry
helma.Html. mapAsString(name, areas)
Returns a rendered image map based on an array containing the map parameters.
parameters
String name The name of the image map
Array areas An array containing objects, where each of them contains the attributes for a single image map entry
returns
The rendered image map
see
helma.Html. table(headers, data, param)
Renders a complete x/html table.
parameters
Array headers An array containing table headers
Array data A two-dimensional array containing the table data
Object param An object containing the following properties:
  • table: Attributes to render within the opening <table> tag
  • tr: Attributes to render within each <tr> tag
  • td: Attributes to render within each <td> tag
  • th: Attributes to render within each <th> tag
  • trHead: Attributes to render within each <tr> tag in the header area of the table
  • trEven: Attributes to render within each even <tr> tag
  • trOdd: Attributes to render within each odd <tr> tag
  • tdEven: Attributes to render within each even <td> tag
  • tdOdd: Attributes to render within each odd <td> tag
  • thEven: Attributes to render within each even <th> tag
  • thOdd: Attributes to render within each odd <th> tag
helma.Html. tableAsString(headers, data, attr)
Returns a rendered x/html table
parameters
Array headers An array containing table headers
Array data A two-dimensional array containing the table data
Object attr For a description see {@link #table}
returns
The rendered table
see
helma.Html. openLink(attr)
Renders an x/html opening link tag
parameters
Object attr An object containing the tag attributes
helma.Html. openLinkAsString(attr)
Returns an x/html opening link tag
parameters
Object attr An object containing the tag attributes
returns
The rendered open link tag
see
helma.Html. closeLink()
Renders an x/html closing link tag
helma.Html. closeLinkAsString()
Returns a rendered x/html closing link tag
returns
Rhe rendered closing link tag
see
helma.Html. color(c)   deprecated
Renders a color definition string. If the string passed as argument contains only hex characters it will be prefixed with a hash sign if necessary, otherwise this method assumes that the value is a named color (eg. "yellow").
parameters
String c The color definintion
helma.Html. colorAsString(c)   deprecated
Returns a color definition.
parameters
String c The color definintion
returns
The rendered color definition
see
helma.Html. form(attr)
Renders an x/html opening form tag
parameters
Object attr An object containing the tag attributes
helma.Html. formAsString(attr)
Returns an x/html opening form tag
parameters
Object attr An object containing the tag attributes
returns
The rendered opening form tag
see
helma.Html. password(attr)
Renders an x/html password input tag
parameters
Object attr An object containing the tag attributes
helma.Html. passwordAsString(attr)
Returns a rendered x/html password input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered password input tag
see
helma.Html. file(attr)
Renders an x/html file input tag
parameters
Object attr An object containing the tag attributes
helma.Html. fileAsString(attr)
Returns a rendered x/html file input tag
parameters
Object attr An object containing the tag attributes
returns
The rendered file input tag
see
helma.Html. activateUrls(str)
Parses the string passed as argument and converts any URL in it into a link tag
parameters
String str The string wherein URLs should be converted into link tags
returns
The string containing URLs converted into link tags
helma.Html.TableWriter. write(text, attr)
Writes a single table cell to response.
parameters
String text The content of the table cess
Object attr An optional object containig attributes to render for this table cell
Closes all open table tags. If {@link #writeString} is set to true, this method returns the rendered table.
returns
The rendered table, if {@link #writeString} is set to true, otherwise void.
Fri, 05 Feb 2010 17:40:05 GMT.

core framework

optional modules

java libraries

properties files