Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7627983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:32:02+00:00 2026-05-31T05:32:02+00:00

I am new to sencha. I am developing an app using treestore and nestedList.

  • 0

I am new to sencha. I am developing an app using treestore and nestedList.
I am unable to load data returned from a coldfusion component.it shows null.

Here is my Viewport.js:

Ext.define('Myapp.view.Viewport', {
  extend: 'Ext.tab.Panel',
  xtype:'newviewport',
  config: { 
        fullscreen: true,
        tabBarPosition: 'top',
        html: 'hiiiiiiiiiii',       
        cls:'test',
        items: [
                {
                    title: 'Sections',
                    iconCls: 'home',         
                    xtype: 'sectionslist'
                }
            ]
               }
  });

My store:samplestore.js

Ext.define('Myapp.store.samplestore', {
extend: 'Ext.data.TreeStore',
config: {
    autoLoad: true,
    model: 'Myapp.model.sampleModel',
    proxy: {
        type: 'ajax',
        url: '/sample/sample1.cfc?method=getSections',      
        reader: {
            type: 'json',
            rootProperty:'DATA'
        }
    }
}

});

My model: sampleModel.js

    Ext.define("Myapp.model.sampleModel", {
    extend: "Ext.data.Model",
    config: {
        fields: [
            {name: 'LoginID', type: 'string'},
            {name: 'FIRSTNAME', type: 'string'}
        ]
    }
});

My sample1.cfc :

    <cfcomponent name="sample" output="false"> 
         <cffunction name="getSections" output="no" returnformat="json"    access="remote">         
    <cfquery name="qryGetDetails" datasource="#request.dsn#">
        SELECT TOP 5
            LoginID, FIRSTNAME
        FROM
            tblUser 
    </cfquery>
        <cfreturn qryGetDetails>

  </cffunction>
</cfcomponent>

My Sectionslist.js

Ext.define('Myapp.view.Sectionslist', {
    extend: 'Ext.dataview.NestedList',
    xtype: 'sectionslist',  
    config: {
        store: 'samplestore'
        itemTpl:  [
                    '{FIRSTNAME}<br/>'
                ].join(''),    
        onItemDisclosure: function(record, btn, index) {
                console.log("worked");
        }
      },  
   //getItemTextTpl: function(node) {
          //console.log(node);
       // return node.data.FIRSTNAME+ ':<strong></strong>';
   // }
});

And finally my json data:

 {"COLUMNS":["LOGINID","FIRSTNAME"],"DATA":[["bt","Jn"],["jr","Jy"],["b20","Best"],["jman","Jeff"],["fenad","Fn"]]}

PLease help to find out my problem, I cant trigger where i went wrong, I am getting null value, as displaying data is wrong.:
itemTpl: [
‘{FIRSTNAME}
‘
].join(”),

Instead of Firstname ,what should i display here??? I tried many methods, but no use, please help…..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:32:03+00:00Added an answer on May 31, 2026 at 5:32 am

    Your JSON is returning a collection of Arrays like

    ["bhpAgent", "Jan"], 
    

    but the field definition expects the response to be a collection of objects like

    {"LoginID": "bhpAgent", "FIRSTNAME": "Jan"}. 
    

    Not sure of the best solution. Can ColdFusion generate JSON objects instead?

    If not, maybe subclass Ext.data.reader.JSON and override getResponseData().

    Might also be worth checking the TreeStore docs as that view has a further requirement for tree structured data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Sencha Touch framework. I need to load some data from
Developing a Sencha Touch MVC app that pulls data from json store (thats set
I am very new to sencha touch. I am developing an App using sencha.
i'm very new to sencha.i have a bit problem in accessing the data from
So I'm developing a Sencha (Javascript) app which needs to make Ajax http requests
I am new in Sencha i have created var genres = new Ext.data.Store({ autoLoad:
I'm new to HTML5 and using sencha touch. Please anyone give me a full
I am new to sencha touch mvc framework and i am using version1.1.1 on
I am new to sencha , and I am using sencha 2 mvc.I am
When using the [relatively new] MVC bits in Sencha Touch I find that 90%

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.