entries are the items. Each has a single attribute 'name' which corresponds to the text content of the
.
==================
Constructor params
==================
The constructor for HtmlTableStore takes the following possible parameters in its keyword arguments:
+--------------+------------------------------------------------------------------------------------------+----------------------+
| **name** | **description** | **type** |
+--------------+------------------------------------------------------------------------------------------+----------------------+
|url |The URL from which to load the HTML file containing the HTML table. This is optional. | string |
+--------------+------------------------------------------------------------------------------------------+----------------------+
|dataId |The id of the HTML tag that contains the table to read from, in either a remote page (if | string |
| |the URL was passed) or in the current HTML DOM if the url parameter is null. This is | |
| |required. | |
+--------------+------------------------------------------------------------------------------------------+----------------------+
|trimWhitespace|**New to Dojo 1.4** Pre 1.4, the surrounding whitespace inside an attribute element, such | boolean |
| |as
in a table was treated as part of the attribute value. This could potentially | |
| |cause problems if the tables were reformatted to include more whitespace, particularly in | |
| |the header where attribute names are read. So this store attribute was added. If set to | |
| |true HtmlStore ignores that whitespace (strips it off), when it indexes the attribute | |
| |headers and when it retrieves values. The default is false for backwards compatibility. | |
+--------------+------------------------------------------------------------------------------------------+----------------------+
===============
Item Attributes
===============
The item attributes are defined by the type of tag set being referenced.
HTML Table:
The tag of the referenced table. Each column name becomes the attribute name for that column when generating the data store view of the data.
DIV collection:
In a DIV collection, the items only contain one attribute/value pair, the text content. Use the attribute 'name' to acquire it.
List:
In a list, the list items have one value, the text content. Use the attribute Use the attribute 'name' to acquire it.
============
Query Syntax
============
The query syntax is identical to :ref:`dojo.data.ItemFileReadStore `. Please refer to it for the format of the queries.
========
Examples
========
Connecting HtmlStore to dijit.form.ComboBox
-------------------------------------------
.. cv-compound ::
.. cv :: javascript
.. cv :: html
isbn |
title |
author |
A9B57C |
Title of 1 |
Author of 1 |
A9B57F |
Title of 2 |
Author of 2 |
A9B577 |
Title of 3 |
Author of 3 |
A9B574 |
Title of 4 |
Author of 4 |
A9B5CC |
Title of 5 |
Author of 5 |
Combo lookup of isbn
Connecting HtmlStore to dojox.grid.DataGrid
-------------------------------------------
.. cv-compound ::
.. cv :: javascript
.. cv :: html
Standard HTML table:
isbn |
title |
author |
A9B57C |
Title of 1 |
Author of 1 |
A9B57F |
Title of 2 |
Author of 2 |
A9B577 |
Title of 3 |
Author of 3 |
A9B574 |
Title of 4 |
Author of 4 |
A9B5CC |
Title of 5 |
Author of 5 |
dojox.grid.DataGrid connected to the above table:
.. cv:: css
Connecting HtmlStore with List to dijit.form.ComboBox
-----------------------------------------------------
.. cv-compound ::
.. cv :: javascript
.. cv :: html
Standard HTML Ordered List:
- Item 1
- Item 2
- Item 3
- Item 4
- Item 5
- Item 6
- Item 7
- Item 8
- Item 9
- Item 10
dijit.form.ComboBox connected to the above list:
Connecting HtmlStore with DIV collection to dijit.form.ComboBox
---------------------------------------------------------------
.. cv-compound ::
.. cv :: javascript
.. cv :: html
DIV collection:
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10
dijit.form.ComboBox connected to the above list:
|