Sencha Touch 1.1使用Ajax返回的内容填充Ext.panel.html
Sencha Touch 1.1 populate Ext.panel.html with Ajax returned content
我正在使用以下代码来显示一个sencha面板。我正在尝试使用json从CMS中提取内容。我试图获得填充"html:"的响应的所有操作都失败了。也许我只是不明白范围?
App.views.howAttend = Ext.extend(Ext.Panel, {
initComponent: function () {
var resp = Ext.Ajax.request({
scope: this,
url: 'mobile-request/pages/how-attend',
success: function ( response ) {
var obj = Drupal.parseJson( response.responseText );
console.log(obj); // this is as expected
//this.html = obj.data doesn't work, neither does using obj.data below, in html:
},
failure: function ( response ) {
console.log (' server error ' + response.status);
}
})
//console.log(this);
App.views.howAttend.superclass.initComponent.call(this);
},
html: 'Nothing'// need to get html returned to here
});
您需要使用:
YourPanel.update(response.responseText);
在成功函数内部
相关文章:
- 如何设置html元素填充的动画
- 如何使用jquery在填充自动完成的值后使文本框只读
- 如何通过ajax刷新JSF填充的javascript变量
- 用与线条相同的颜色填充多折线图上的点
- Extending Ext.data.NodeInterface
- 用每小时的差值填充数组/列表-从下拉列表中给定两个时间值
- 带有填充属性的SVG矩形显示在包含元素的上方插入框阴影
- 用我的json数据填充JQuery DataTable
- 使用 jQuery 检查所有值是否为空或已填充
- 为什么不't我的变量在我的控制器中填充后在我的视图中呈现
- 在EXT窗体面板中填充EXT JS存储
- 如何使用 Ext-JS 中的默认值填充 ItemSeclector 中的“选定”列
- Ext 3.4-如何使用本地数组动态填充组合框
- Sencha Ext面板填充浏览器
- Sencha Touch 1.1使用Ajax返回的内容填充Ext.panel.html
- EXTJS在Ext.property.Grid填充内容时为单元格上色
- 更改EXTjs的ext.tab.Tab组件的高度或添加填充
- 在EXT JS中使用JSON根据在另一个DropDown中选择的值填充一个DropDown/Select
- Ext JS -如何在新窗口中从网格填充文本字段
- 无法从Ext.data.store填充字段