ResultList is a editable template for displaying a list of Results received from a dataStore. ResultList can split results into pages and have lazy-loading capability.
Description | ||
new ResultList(params?srcNodeRef?) |
Create a new ResultList widget. |
Type | Description | |
_itemData | Dojo/store/Memory |
ItemData is a data in items. |
_styleAttr | Object |
when you want to set style for other node. you can do this by example...
_styleAttr:{
|
alwaysShowPaging | Boolean |
If true, page navigation panel is shown and the result list is shown with all applicable paging settings. If false, there is no page navigation panel and all data records are displayed in one page. |
beginParamName | String |
Specifies first parameter name that used to begin query data when set pagePerQuery > 0 or alwaysShowPaging=true. In the process the widget will automatically calculate first record. 'Service' and 'stored procedure' must support this parameter. |
currentPageLabel | String |
Label for current page in navigation panel. |
customIcons | ToolDef[] |
Add custom icons and their functionalities using ToolDef objects. |
dataNotFoundText | String |
Message that displays when there is no data found. |
dataStore | DataStore |
A data store is a repository of a set of data objects. |
detailField | String |
Field name for the detail section of each record. The corresponding values to the field name can be a plain string or a HTML structure. |
detailList | Object |
Detail of resultList on each record. |
enabledGotoPage | Boolean |
If true, a user can specifies a page to change by inputting a page number. |
enabledPinRunning | Boolean |
If true, the result list will sequentially lookup pin image file name with numbers inside directory specified in pinIcon property and with specified file type in pinExt property. i.e. First record in the page will use "pin1" then second record will be matched to "pin2 and continues until the last record. For this to be successful, there must be at least equal number of images with pageSize specified or all records in the data. If false, the result list will lookup pin image file name of "pin" only and it will use the image repeatedly until the last record. |
enabledTotal | Boolean |
If true, display total number of records in a table. |
endParamName | String |
Specifies last parameter name that used to query data when set pagePerQuery > 0 or alwaysShowPaging=true. In the process the widget will automatically calculate last record. 'Service' and 'stored procedure' must support this parameter. |
filter | Object | Function |
A data filter. |
idProperty | String |
An unique id for an element. (The specified value must be unique within the document.) |
itemFirstLoad | Number |
The number of items to add to the result list during initial load in lazy loading mode. |
itemOver | Boolean |
If true, each record will be highlighted as a mouse pointer moves over the record. |
itemPerAppend | Number |
The number of items to append to the result list on subsequent loading in lazy loading mode. |
itemPerQuery | Number |
The number of items to query for each query request in lazy loading mode. |
items | Dojo/store/Memory |
Unused |
itemSelect | Boolean |
If true, each record will be selectable. |
itemSelectedData | Object[] |
Currently selected records of data. |
lazyLoadMode | Boolean |
If true, the result list is in lazy loading mode. |
multiSelect | Boolean |
If true, multiple records can be selected at the same time. This feature is active when itemSelect property is also true. |
pageData | Object[] |
Container of all records in the current page. |
pageFromLabel | String |
Label for total number of pages in navigation panel. |
pagePerQuery | Number |
Number of result list pages per one query request. |
pageSize | Number |
Number of records to be displayed on each page. |
pagingBand | Object |
Number of visible page numbers for each screen size. This object contains 3 fields:
|
pagingSize | Number |
Number of visible page numbers in page navigation. |
pinExt | String |
Image file type. |
pinIcon | String |
Relative path to pin image folder. You must to set name of image in the specified folder to format "pin{number}". Example: pin1 |
primaryKeyField | String |
Primary key field name. Required when ItemSelect and MultiSelect properties are set to 'true'. The result list's primary key field name must be specified before binding the data to the result list.. |
targetNode | String |
Target node where the result list (excluding the record total) will be geanerated. |
titleField | String |
Field name for the title of each record. |
toggleSelect | Boolean |
If true, a record toggles between selected and normal states when they are clicked repeatedly. This feature is active when itemSelect property is also true. |
total | Number |
Total number of records of data. |
totalTextFormat | String |
Text format to show total number of records. |
visibleDeleteIcon | Boolean |
If true, delete icon is shown on the rigth of record. |
visiblePinIcon | Boolean |
If true, pin icons is shown on each record. |
width | Number | String |
Width of a result list. |
xPercentage | Number |
The percentage of scroll remaining in x-axis (horizontal). |
xPixels | Number |
The pixel of scroll remaining in x-axis (horizontal). |
yPercentage | Number |
The percentage of scroll remaining in y-axis (vertical). |
yPixels | Number |
The pixel of scroll remaining in y-axis (vertical). |
Return type | Description | |
_abortRequest() | None |
|
bind(dataStore) | Dojo/Deferred |
Bind data to the result list. |
refresh(dataStore) | None |
Refresh the result list. This will re-query the DataStore for the most up-to-date results. |
reset() | None |
Reset all state and value to default. |
getCheckBoxCheckedData(toolDef) | Object[] |
Return records with checkbox checked. |
clearSelection(Array) | None |
Clear record selections. If no parameter is given, all selections are unselected. Otherwise, only specified selections are unselected. |
__baseClassInherit(constructor) | None |
get className from superclass. |
unbind() | None |
Remove binded data from control |
() | Dojo/store/Memory |
Return a Memory object containing all records within a result list page. If the result list is in lazy loading mode, only loaded data prior usage of this methof is returned. Further data will be available as the result list loads more data prior subsequent usage of this method. |
isVisible(elem?) | Boolean |
Return true if the element is visible, otherwise false. |
toggle(elem?) | None |
Toggle visibility of a specified element. |
show(elem?) | None |
Display a specified element. |
hide(elem?) | None |
Hide a specified element. The hidden element will not be displayed at all. |
disableReachXChecking() | None |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough xPercentage or xPixel properties are reached. |
enableReachXChecking() | None |
Enable lazy loading checkings in x-axis (horizontal). |
disableReachYChecking() | None |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough yPercentage or yPixel properties are reached. |
enableReachYChecking() | None |
Enable lazy loading checkings in y-axis (vertical). |
Description | ||
bind-completed |
Fires when bind data completed. |
|
bind-error |
Fires when bind data error. |
|
delete_click |
Fires when the mouse click delete button. |
|
image-click |
Fires when the user clicks on an image. |
|
image-mouseout |
Fires when the mouse pointer is moved out of an image. |
|
image-mouseover |
Fires when the mouse pointer is moved over an image. |
|
item-click |
Fires when the user clicks on an item. |
|
item-mouseout |
Fires when the mouse pointer is moved out of an item. |
|
item-mouseover |
Fires when the mouse pointer is moved onto an item. |
|
page_Changed |
Fires when page changed. |
|
query-data-completed |
Fires when query data completed. |
|
query-data-error |
Fires when query data error. |
|
query-data-start |
Fires when start query data. |
|
reached-x |
Fired when xPercentage or xPixel properties are reached. |
|
reached-y |
Fired when yPercentage or yPixel properties are reached. |
|
tool-click |
Fires when tool clicked (icon custom). |
ItemData is a data in items.
when you want to set style for other node. you can do this by example...
_styleAttr:{
style-property
:effected-node
}
this property was effected where this class was inherited and your widget was called by...
var widget = new YourWidget({
style:{
style-property
:style-value
}
});
now effected-node
in you widget will have style-property
= style-value
Default value: {}
If true, page navigation panel is shown and the result list is shown with all applicable paging settings. If false, there is no page navigation panel and all data records are displayed in one page.
Default value: true
Specifies first parameter name that used to begin query data when set pagePerQuery > 0 or alwaysShowPaging=true. In the process the widget will automatically calculate first record. 'Service' and 'stored procedure' must support this parameter.
Default value: BEGIN
Message that displays when there is no data found.
Default value: ไม่พบข้อมูล
Field name for the detail section of each record. The corresponding values to the field name can be a plain string or a HTML structure.
Default value: DETAIL
If true, a user can specifies a page to change by inputting a page number.
Default value: false
If true, the result list will sequentially lookup pin image file name with numbers inside directory specified in pinIcon property and with specified file type in pinExt property. i.e. First record in the page will use "pin1" then second record will be matched to "pin2 and continues until the last record. For this to be successful, there must be at least equal number of images with pageSize specified or all records in the data. If false, the result list will lookup pin image file name of "pin" only and it will use the image repeatedly until the last record.
Default value: true
Specifies last parameter name that used to query data when set pagePerQuery > 0 or alwaysShowPaging=true. In the process the widget will automatically calculate last record. 'Service' and 'stored procedure' must support this parameter.
Default value: END
A data filter.
// 1. for type of Function
this.set("filter", lang.hitch(this, function (item) {
return item["CHECK"] == true;
}));
// 2. for type of Object
this.set("filter", { CHECK: true });
An unique id for an element. (The specified value must be unique within the document.)
Default value: "id"
The number of items to add to the result list during initial load in lazy loading mode.
Default value: 10
If true, each record will be highlighted as a mouse pointer moves over the record.
Default value: true
The number of items to append to the result list on subsequent loading in lazy loading mode.
Default value: 3
The number of items to query for each query request in lazy loading mode.
Default value: 3
Unused
If true, multiple records can be selected at the same time. This feature is active when itemSelect property is also true.
Default value: false
Number of visible page numbers for each screen size. This object contains 3 fields:
phone
. tablet
. desktop
. pagingBand: {
phone: 3,
tablet: 7,
desktop: 10}
Relative path to pin image folder. You must to set name of image in the specified folder to format "pin{number}". Example: pin1
pinIcon: 'images/png/pin'
Primary key field name. Required when ItemSelect and MultiSelect properties are set to 'true'. The result list's primary key field name must be specified before binding the data to the result list..
Target node where the result list (excluding the record total) will be geanerated.
If true, a record toggles between selected and normal states when they are clicked repeatedly. This feature is active when itemSelect property is also true.
Default value: true
Text format to show total number of records.
Default value: จำนวนผลลัพธ์ {total} รายการ
If true, delete icon is shown on the rigth of record.
Default value: false
Bind data to the result list.
<DataStore>
dataStore
|
Required |
DataStore of data for binding to the result list. |
Refresh the result list. This will re-query the DataStore for the most up-to-date results.
<DataStore>
dataStore
|
Required |
DataStore of data for refreshing to the result list. |
Reset all state and value to default.
Return records with checkbox checked.
<Object>
toolDef
|
Required |
Checkbox ToolDef object. |
Clear record selections. If no parameter is given, all selections are unselected. Otherwise, only specified selections are unselected.
<Number[]>
Array
|
Required |
of primary keys of specific records. |
get className from superclass.
<Object>
constructor
|
Required |
|
Remove binded data from control
Return a Memory object containing all records within a result list page. If the result list is in lazy loading mode, only loaded data prior usage of this methof is returned. Further data will be available as the result list loads more data prior subsequent usage of this method.
Return true if the element is visible, otherwise false.
<Node>
elem
|
Optional |
Specified element to be checked. If not specified, domNode of the widget is used instead. |
Toggle visibility of a specified element.
<Node>
elem
|
Optional |
Specified element to toggle visibility. |
Display a specified element.
<Node>
elem
|
Optional |
Specified element to be displayed. |
Hide a specified element. The hidden element will not be displayed at all.
<Node>
elem
|
Optional |
Specified element to be hidden. |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough xPercentage or xPixel properties are reached.
Enable lazy loading checkings in x-axis (horizontal).
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough yPercentage or yPixel properties are reached.
Enable lazy loading checkings in y-axis (vertical).
Fires when bind data completed.
<Object>
data
|
Data that bind to the control. |
Fires when the user clicks on an image.
Fires when the mouse pointer is moved out of an image.
Fires when the mouse pointer is moved over an image.
Fires when the user clicks on an item.
Fires when the mouse pointer is moved out of an item.
Fires when the mouse pointer is moved onto an item.
Fires when query data completed.
<Object>
response
|
Response when query data complete. |
Fired when xPercentage or xPixel properties are reached.
Fired when yPercentage or yPixel properties are reached.