View Full Version : Getting an XML node automatically in Xtemplate

30 Aug 2009, 11:25 AM

I am wondering if it is possible to get the nodevalue from a XML document in a Xtemplate without defining it in the Ext.data.Record class first?
I've read that one can extend the template with member functions, but I don't know how I can get a reference to the XML-document being parsed?

So, for your information I've defined an Ext.data.Record, an Ext.data.XMLreader, a store, and a Rowexpander grid.

Suppose I have this xml:
<projectname>blah 1</projectname>

Now I've defined the Record object as:
var record = Ext.data.Record.create([
{name: 'projectname'},
{name: 'membername', mapping: 'members/member/name'}

Now what I want is to automatically get the nodevalue of the node "link" without defining it first in the Record-object.
Can that be done by any means?

Thanks in advance.

6 Sep 2009, 9:59 AM
Hm, I am currently still searching for a solution, is there anybody who can help?

6 Sep 2009, 11:01 PM
You need the data somewhere in your record and the 2 fields you defined now don't contain this data. So the only option is to add a field.