Opened 12 years ago

Closed 12 years ago

#5257 closed enhancement (fixed)

QueryReadStore: getLabel (from FileItemReadStore)

Reported by: guest Owned by: Jared Jurkiewicz
Priority: high Milestone: 1.1
Component: DojoX Data Version: 1.0
Keywords: Cc: juho.manninen@…
Blocked By: Blocking:

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 (1)

patch5257.patch (3.0 KB) - added by wolfram 12 years ago.
implemented label functions and tests, fixed getAttributes() test, which i had screwed by modifying the PHP file last time

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Adam Peller

Milestone: 1.0.21.1

comment:2 Changed 12 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to wolfram

Changed 12 years ago by wolfram

Attachment: patch5257.patch added

implemented label functions and tests, fixed getAttributes() test, which i had screwed by modifying the PHP file last time

comment:3 Changed 12 years ago by wolfram

Owner: changed from wolfram to Jared Jurkiewicz

please commit

comment:4 Changed 12 years ago by Jared Jurkiewicz

(In [13008]) Adding in patch for getLabel provided by wolfram. refs #5257 !strict

comment:5 Changed 12 years ago by Jared Jurkiewicz

Resolution: fixed
Status: newclosed

Tested on:

Firefox 2.0.0.12 Safari B3: IE 6 Seamonkey 1.1.2 IE 7

Passed.

Closing as fixed.

Note: See TracTickets for help on using tickets.