Opened 12 years ago

Closed 12 years ago

#3404 closed defect (invalid)

Have getIdentityAttributes do forceload

Reported by: haysmark Owned by: Jared Jurkiewicz
Priority: high Milestone: 0.9beta
Component: Data Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

I want this sort of code to work without waiting for a fetch to finish in my widget's postCreate:

_getValueField: function(){
	return this.keyAttr ? this.keyAttr : this.store.getIdentityAttributes()[0];
},

Change History (1)

comment:1 Changed 12 years ago by Jared Jurkiewicz

Resolution: invalid
Status: newclosed

Incorrect usage of the API.

getIdentityAttributes: function(/* item */ item){

summary: Returns an array of attribute names that are used to generate the identity. For most stores, this is a single attribute, but for some complex stores such as RDB backed stores that use compound (multi-attribute) identifiers it can be more than one. If the identity is not composed of attributes on the item, it will return null. This function is intended to identify the attributes that comprise the identity so that so that during a render of all attributes, the UI can hide the the identity information if it chooses. item: The item from the store from which to obtain the array of public attributes that compose the identifier, if any. examples: var itemId = store.getIdentity(kermit); var identifiers = store.getIdentityAttributes(itemId);

assert(typeof identifiers === "array"
identifiers === null);

Note that item is not defined as an optional parameter.

Note: See TracTickets for help on using tickets.