Results 1 to 2 of 2

Thread: Binding JSON result to Label.

  1. #1
    Sencha User
    Join Date
    Apr 2016

    Default Binding JSON result to Label.

    Hi All,

    Actually I am using ext JS 3.2.1 version and I want to bind the JSON result as the text of my label. Tried few ways but not achieved the desired result.

    Below is the method that returns JSON result:

    BannerDetail: new{
    root: 'showbanner',
    storeId: 'BannerDetail',
    idProperty: 'Description',
    //autoload: true,
    fields: ['Description'],
    //name: [lblOutage],
    init: function () {

    var mask = new Ext.LoadMask(
    msg: "Please wait...",
    store: BannerDetail

    callback: function (record, options, success) {
    if (!success) {
    Ext.MessageBox.alert('Error', 'Unable to retrieve banner messages.');
    proxy: new{
    method: 'POST',
    timeout: 2700000,
    url: 'Outage/showbanner' --> returning json result

    And the code of my label is:
    { xtype: 'label',
    bodyStyle: 'background-color: transparent;',
    cls: 'x-form-item scroll-left',
    text: "" --> Even I want to know how to format the label text with html tags.
    name: 'lblOutage',

    Using above code, I am constantly getting the error message "Unable to retrieve banner messages." which I have written in the above method.

    Please advice how to achieve this.

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Feb 2013


    You might try formatting your code for better readability or better yet post a test case. As far as HTML tags, can you utilize the tpl of the label?

Similar Threads

  1. Replies: 2
    Last Post: 15 Aug 2011, 11:49 AM
  2. get json result from php to ext js
    By edwin.deloso in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 29 Dec 2010, 6:21 AM
  3. Json without result
    By wki01 in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 8 Jun 2010, 12:27 AM
  4. How can I get the JSON result to the datastore?
    By chamlie in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 Feb 2008, 2:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts