Ticket #5257 (closed enhancement: fixed)

Opened 12 months ago

Last modified 9 months ago

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

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

Change History

Changed 12 months ago by peller

  • milestone changed from 1.0.2 to 1.1

Changed 12 months ago by jaredj

  • owner changed from jaredj to wolfram

Changed 9 months ago by wolfram

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

Changed 9 months ago by wolfram

  • owner changed from wolfram to jaredj

please commit

Changed 9 months ago by jaredj

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

Changed 9 months ago by jaredj

  • status changed from new to closed
  • resolution set to fixed

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.