Currently I'm working on a basic editor and I'm having an issue displaying information in my Panel (south view) via templates.
I have a panel consisting of three regions
West: Contains a tree panel I use to navigate
Main: although not in my code below will be a grid
South: This will be a property summary displayed via a template
My issue is that when I click one of my tree items to display its information in my south region with a template, I can see the table structure and my hardcoded display, however the dynamic data I'm attempting to load via JSON will not display, basically like I'm getting null results.
Here's how my JSON appears which my datastore loads:
{"results":[{"tn":"thumbImage.jpg","title":"My Title","albumid":"0001","description":"This is my description"}]}
The method in which I'm producing the JSON is working properly, my tree relies on the same format and same mapping, but given different parameters. Basically I don't believe there is an issue with the JSON but how I'm trying to implement what I'm trying to do. My tree works perfect. Module List | Drupal Tips:: JsMath for displaying mathematics with TeX. JSnippets. JSON server. jTooltips {add permission: Taxonomy import/export via XML. Taxonomy Introduction http://drupal-tips.org/module-listHOME |
Below is my code, everything seems to render fine, don't see any errors being produced, I'm just not seeing anything getting populated in my template.
Ext.onReady(function(){
Ext.QuickTips.init();
var ALBUM_PROPS_STORE = new Ext.data.JsonStore({
url: 'index.cfm?proc=showXmlProps',
root: 'results',
remoteSort: false,
fields: [
'albumid',
'title',
'description',
'tn'
]
});
var ALBUM_PROPS_TEMPLATE = new Ext.XTemplate(
'',
'',
'',
'Album ID: | ',
'{albumid} | ',
'Thumbnail: | ',
'{tn} | ',
' ',
'',
'Title: | ',
'{title} | ',
' ',
'',
'Description: | ',
'{description} | ',
' ',
' ',
'
Thanks! That was it, worked fine after I added that.
I think what threw me off was seeing the the snippet for the Template in the API docs.
Template API (http://extjs.com/deploy/dev/docs/?class=Ext.Template)
I didn't see the '' being used so I thought it was for looping over a collection.
Thanks again!
Your record is not in scope when rendering the template.
Add (see API docs (http://extjs.com/deploy/dev/docs/?class=Ext.DataView)).
I Am a Sinner – What About You?
Global Sourcing and Supplier Online by Dylan
|