ResultEditor is an enhanced version of ResultList. ResultEditor can delete results in a result list. The new list can then be used for further processing. It can also be further customized to do other features in conjunction with the default deletion function.
Description | ||
new ResultEditor(params?srcNodeRef?) |
Create a new ResultEditor 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:{
|
alwaysShowCheckbox | Boolean |
If true, checkboxes are always visible. |
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. |
autoHideCheckbox | Boolean |
If true, the deletion checkboxes will hide after confirmation to delete selected results. |
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. |
disableCheckboxFieldName | String |
Field name in the result data that is used to determine whether the checkbox of a particular record is disabled from changing its state. Use this property in conjunction with disableCheckboxValue property. |
disableCheckboxValue | String | Number | Boolean | Object |
Value of a coresponding field name in the result data that is used to determine whether the checkbox of a particular record is disabled from changing its state. Use this property in conjunction with disableCheckboxFieldName property. |
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. |
enableMultiDelete | Boolean |
If true, multiple deletions of result records are allowed. |
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: 1. phone: number of paging for size phone . 2. tablet: number of paging for size tablet . 3. desktop: number of paging for size desktop . |
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 |
preventInjection | Boolean |
If true, prevent HTML injection. If false, allow HTML injection. If null, the control will refer to the web configuration file whether to prevent or allow HTML injection. |
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.. |
selectCheckboxAllText | String |
Select all checkbox label. |
targetNode | String | Target node where the result list (excluding the record total) will be geanerated. |
textCancel | String |
Label of confirmation button (as part of delete confirmation). |
textCancel | String |
Label of cancel button (as part of delete confirmation). |
textDelete | String |
Delete button label. |
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 | |
__baseClassInherit(constructor) | None |
get className from superclass. |
_abortRequest() | None |
|
bind(dataStore) | Dojo/Deferred | Bind data to the result list. |
cancelMultiDelete() | None |
Cancel deletion of the checked records. |
clearSelection(Array) | None | Clear record selections. If no parameter is given, all selections are unselected. Otherwise, only specified selections are unselected. |
confirmMultiDelete(dataChecked) | None |
Comfirm deletion of the checked records. |
disableReachXChecking() | None |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough xPercentage or xPixel properties are reached. |
disableReachYChecking() | None |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough yPercentage or yPixel properties are reached. |
enableReachXChecking() | None |
Enable lazy loading checkings in x-axis (horizontal). |
enableReachYChecking() | None |
Enable lazy loading checkings in y-axis (vertical). |
forceChange(checkedvalue) | None | |
getCheckBoxCheckedData() | None |
Get the checked record of result. |
getUserIDIsSelected() | Number[] |
Get ID of the selected records. |
hide(elem?) | None |
Hide a specified element. The hidden element will not be displayed at all. |
hideCustomIcon() | None |
Hide custom icon or option e.g. the default delete option. |
isVisible(elem?) | Boolean |
Return true if the element is visible, otherwise false. |
refresh(dataStore) | None | Refresh the result list. This will re-query the DataStore for the most up-to-date results. |
reset(status) | None |
Enable or disble checkboxes according to status parameter. |
reset() | None |
Resets the result editor. |
setDataForceChecked(toolDef) | None |
Set a data to result editor with initial checked state to each record in the data. |
shortcutXdata(data) | None | |
show(elem?) | None |
Display a specified element. |
showCustomIcon() | None |
Show custom icon or option e.g. the default delete option. |
toggle(elem?) | None |
Toggle visibility of a specified element. |
unbind() | None |
Remove binded data from control |
Description | ||
bind-completed |
Fires when bind data completed. |
|
bind-error | Fires when bind data error. | |
confirm-multi-delete |
Fires when confirmation on multiple deletion of checked records. |
|
delete-cancel-click |
Fires when click on cancel button (during delete confirmation phase). |
|
delete-click |
Fires when click on delete button. |
|
delete-confirm-click |
Fires when click on confirm button (during delete confirmation phase). |
|
delete_click | Fires when the mouse click delete button. | |
editor-check-all |
Fires when click on select all checkbox. |
|
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: {}
Default value: true
If true, the deletion checkboxes will hide after confirmation to delete selected results.
Default value: true
Default value: BEGIN
Default value: ไม่พบข้อมูล
Default value: DETAIL
Field name in the result data that is used to determine whether the checkbox of a particular record is disabled from changing its state. Use this property in conjunction with disableCheckboxValue property.
Default value: null
Value of a coresponding field name in the result data that is used to determine whether the checkbox of a particular record is disabled from changing its state. Use this property in conjunction with disableCheckboxFieldName property.
Default value: null
Default value: false
Default value: true
If true, multiple deletions of result records are allowed.
Default value: true
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"
Default value: 10
Default value: true
Default value: 3
Default value: 3
Default value: false
phone
. tablet
. desktop
. pagingBand: {
phone: 3,
tablet: 7,
desktop: 10}
pinIcon: 'images/png/pin'
If true, prevent HTML injection. If false, allow HTML injection. If null, the control will refer to the web configuration file whether to prevent or allow HTML injection.
Default value: false
Label of confirmation button (as part of delete confirmation).
Default value: "Hủy bỏ"
Label of cancel button (as part of delete confirmation).
Default value: "Hủy bỏ"
Default value: true
Default value: จำนวนผลลัพธ์ {total} รายการ
Default value: false
get className from superclass.
<Object>
constructor
|
Required |
|
<DataStore>
dataStore
|
Required |
DataStore of data for binding to the result list.
|
Cancel deletion of the checked records.
<Number[]>
Array
|
Required |
of primary keys of specific records.
|
Comfirm deletion of the checked records.
<Object[]>
dataChecked
|
Required |
Checked records. |
Disable the lazy loading checkings. Data will not be loaded further than the specified position eventhough xPercentage or xPixel properties are reached.
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 x-axis (horizontal).
Enable lazy loading checkings in y-axis (vertical).
Get the checked record of result.
Hide a specified element. The hidden element will not be displayed at all.
<Node>
elem
|
Optional |
Specified element to be hidden. |
Hide custom icon or option e.g. the default delete option.
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. |
<DataStore>
dataStore
|
Required |
DataStore of data for refreshing to the result list.
|
Enable or disble checkboxes according to status parameter.
<Boolean>
status
|
Required |
State status of the checkboxes. If true, the checkboxes are enabled otherwise false. |
Resets the result editor.
Set a data to result editor with initial checked state to each record in the data.
<Object[]>
toolDef
|
Required |
Checkbox ToolDef object. |
Display a specified element.
<Node>
elem
|
Optional |
Specified element to be displayed. |
Show custom icon or option e.g. the default delete option.
Toggle visibility of a specified element.
<Node>
elem
|
Optional |
Specified element to toggle visibility. |
Remove binded data from control
Fires when bind data completed.
<Object>
data
|
Data that bind to the control. |
Fires when confirmation on multiple deletion of checked records.
<Object[]>
dataChecked
|
Checked records. |
Fires when click on cancel button (during delete confirmation phase).
Fires when click on delete button.
Fires when click on confirm button (during delete confirmation phase).
Fires when click on select all checkbox.
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.