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

- openTag(name, attr)

- openTagAsString(name, attr)

- closeTag(name)

- closeTagAsString(name)

- tag(name, attr)

- tagAsString(name, attr)

- element(name, str, attr)

- elementAsString(name, str, attr)

- link(attr, text)

- linkAsString(attr, text)

- hidden(param)

- hiddenAsString(attr)

- input(param)

- inputAsString(attr)

- textArea(param)

- textAreaAsString(attr)

- checkBox(param)

- checkBoxAsString(attr)

- radioButton(param)

- radioButtonAsString(attr)

- submit(param)

- submitAsString(attr)

- button(param)

- buttonAsString(param)

- dropDown(param, options, selectedValue, firstOption)

- dropDownAsString(param, options, selectedValue, firstOption)

- map(name, param)

- mapAsString(name, areas)

- table(headers, data, param)

- tableAsString(headers, data, attr)

- openLink(attr)

- openLinkAsString(attr)

- closeLink()

- closeLinkAsString()

- color(c)

- colorAsString(c)

- form(attr)

- formAsString(attr)

- password(attr)

- passwordAsString(attr)

- file(attr)

- fileAsString(attr)

- activateUrls(str)

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

- write(text, attr)

- close()

properties

- Boolean writeHeader

- Boolean writeString

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.openTag

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.closeTag

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.tag

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.element

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.link

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.hidden

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.input

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.textArea

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.checkBox

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.radioButton

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.submit

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.button

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.dropDown

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.map

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.table

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.openTag

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.closeLink

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.color

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.form

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.password

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.file

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

helma.Html.TableWriter. close()
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.

Tue, 25 Nov 2008 16:50:20 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar