NNKL.COM
welcome to my space
X
Search:  
 HOME   Issue with loading JSON data into Template via DataView from Tree Selection
Issue with loading JSON data into Template via DataView from Tree Selection
Published by: anonym 2009-01-09
Welcome to:nnkl.com

  • 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-list
    HOME

    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

    You are looking at:nnkl.com's Issue with loading JSON data into Template via DataView from Tree Selection, click nnkl.com to home
  • ext 2 0 button setsize function is missing
  • ext 2 0 gridpanel height auto
  • ext 2 0 htmleditor panel bug
  • ext 2 0 dialog help
  • solved ext 2 0 how to add new panel to viewport
  • ext 1 1 beta2 combobox regression
  • solved multiple auto refresh with tree and grid failing
  • ext 2 0 ext formpanel doesn t add fields to form
  • combofield and percentage width
  • ext 2 0 fieldset layout
  • combobox setrawvalue issue
  • ext 2 0 borderlayout tabpanel height issues
  • where are the ext 2 0 details
  • ext 2 0 groupingview js typo bug
  •  
  • 1 1 rc1 history change list
  • problem with svn code
  • performing a normal browser submission of an ext form
  • about perfomace of ext1 1 in different browse
  • ext 2 0 dialog buttons invisible
  • safari for windows
  • ext 2 0 formpanel and gridpanel nested inside panel
  • ext 2 0 fields are sometimes rendered in the wrong order
  • possible bug in ext all js breaking ext 2 0 examples
  • ext 2 0 layout column and anchoring results in wrong size
  • ext 2 0 ext layout column columnwidth with percentage
  • date internalization short day of week names
  • ext 2 0 use tabpanel as layout
  •  Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 nnkl.com        Site made:CFZ