• dojox/mobile/RoundRectList
• dojox/mobile/EdgeToEdgeCategory
dojox/mobile/EdgeToEdgeStoreList
This widget provides a list whose content is determined from a Dojo Store.
We can dynamically set the Store used by the list using the setStore() method.
This widget has a property called "itemMap" which appears to be quite unusual from a
Dojo/JavaScript perspective. It is an Object with the property names being properties in the Store
and the values of those properties being the properties on a ListItem that we wish to set.
For example, we see that ListItem has a property called "label" used to set the label of list
item. If we wish to have the Store data property called "companyName" be the value of the label
in a list item, we would declare:
itemMap: {
companyName: "label"
};
This is potentially confusing to many Dojo users as we are more used to structures which set the
property we wish to set to the value. For example:
itemMap: {
label: "companyName"
};
One interesting thing to note is that the itemMap is not constrained to supply data properties for
display. We can also use it to set arbitrary properties on a list item. For example, to register a
function to be called when a list item is clicked, we can declare:
itemMap: {
dataItemClick: "onClick"
}
Then it is assumed that the data of the store will contain a property called "dataItemOnClick"
which will be a function which will be invoked when the list item is clicked.
See also:
• Object Stores and Data Stores
• Working with Dojo Mobile Lists
dojox/mobile/ExpandingTextArea
This widget provides an input text area into which free form text may be entered. The area can
expand as more data is entered or it can be dragged to a specific size.
Some of the key properties of this widget include:
• value – The value of the text contained within
• maxLength – The maximum length of text (in characters) that can be entered.
Page 236
Comentários a estes Manuais