Ticket #5257 (closed enhancement: fixed)
QueryReadStore: getLabel (from FileItemReadStore)
| Reported by: | guest | Owned by: | jaredj |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | DojoX Data | Version: | 1.0 |
| Severity: | minor | Keywords: | |
| Cc: | juho.manninen@… |
Description
Even though it clearly says in QueryReadStore?'s getLabel-function: "Override it to return whatever the label shall be, see Read-API.", I feel that a default implementation would be valuable. Plus, it's relatively simple to implement by recycling FileItemReadStore?. FileItemReadStore? allows setting label just like the identifier - in response data object.
The getLabel-function:
getLabel: function(/* item */ item){
if(this._labelAttr && this.isItem(item)){
return this.getValue(item,this._labelAttr); //String
}
return undefined; //undefined
},
In addition, it would require setting label somewhere in _fetchItems:
this._labelAttr = data.label;
Attachments
Change History
Note: See
TracTickets for help on using
tickets.