Answered: How can I assign a custom property to every element of an XTemplate
I would like to open a custom window based on a property name returned by a Json object. This json object builts the items of a View, and I would like to attach a custom property to each item of the XTemplate which will contain the value of the json object.
After, it will be possible to read this property in the itemdblclick event of the View.
Perhaps I've misunderstood the question but couldn't you just grab the record in the itemdblclick handler and use that to locate the property you're interested in? I don't see a good reason to store this information on the element.
Mh well the problem is that I'm creating a view from a JSON store, one of the properties from that json should be attached in some way to an item that will be templated with xtemplate, because there isn't a good place in html where it fits (it's a name of the extjs window class I should open). So yes I can grab the property when I'm in itemdblclick, but this property it's not a default one but something I want to create on the item.
I don't even know if this is possible, actually I'm using a workaround accessing the store with the index obtained from itemdblclick params and it's working well.