extjs - Creating a dynamic detail card -


To create a dynamic description card for the nested list pulls data from the same Jason Store which is a nested list

im created an app using a nested list and 10 questions - each question has its own answer in which there is a copy and an image.

I would like to use every answer to use. Jason file copies and img filename pulls an extension card

Anybody can help - Thanks

You can use an itemtap event on your list using the controller. The assigned handler will receive the record.

From there you can open an Ext.Panel in the configuration of this panel Data should be an empty object at startup, and tpl get data.

Once you have got this setup, you can use the setData () method to add data to your new panel.

The control method will look something like this:

  / ** * show details * @the ultimate CMP tap component * @ PRAM index item index * @most target goal Taped * @ Param record record tape * / OnListItemTapped: function (cmp, index, target, record) {var record.data = record.getData (), detailView = Ext.create ('MyProject.view.DetailView'); DetailView.setData (recordData); Ext.Viewport.add (detailView); }   

The configuration of the view of Ext.Panel should look something like this:

  {styleHtmlContent: true, data: {}, tpl: [' Lt; H3 & gt; {Question} & lt; / H3 & gt; ',' & Lt; P & gt; {AnswerCopy} & lt; / P & gt; ',' & Lt; Img src = "{answerImageUrl}" & gt; ',]. }}    

Comments