Results 1 to 3 of 3

Thread: Load dynamic html in view

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User deepakgarg89's Avatar
    Join Date
    Nov 2012
    Gurgaon, India
    Vote Rating

    Default Answered: Load dynamic html in view


    I had make a view in sencha touch 2 app

    Ext.define("Myapp.view.Mynestedlist", {
    extend: 'Ext.Panel',
    xtype: 'mynestedlist',
    config: {
    html: [
    Hi nested list'

    Here i want to load the html from my server through ajax. Can anyone please tell me a method how can i get dynamic html here.

  2. You can of course do this many different ways. Some questions can be asked to help find the best solution for you. When do you want the content to load? How often will the content change?

    I would generally recommend this be part of an MVC app. In the controller you could listen for an event such as activate on the panel then run the ajax request. In the callback you can use the panel's setHtml method to set the data. Alternately if you specify a template on the panel, you'd use the setData method.

    If this doesn't get you on your way, post more details about your app and what you want to accomplish.


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