How to manipulate dynamic objects in Sencha touch

送分小仙女□ 提交于 2019-12-11 19:17:53

问题


So I would like to dynamically load / change elements of the xtype objects. So for example on the logic in the initialise method I would like to load either one or the other this.down("#homeView").title.

Ext.define("APN.view.FlyoutNavigation", {
    id: "flyoutNavigationPanel",
    extend: 'Ext.ux.slidenavigation.View',
    requires: [
        'Ext.Container',
    ],
    config: {
        items: [
            {
                itemId: 'nav_home',
                id: 'homeView',
                title: "theTitleThatIwantToChange"
...

While I'm looking at things like setHtml, or just simply assigning this variable to "" doesn't have any impact on the UI component.

So my question is how to dynamically load the variable of an object this.down("#homeView")


回答1:


To change the title you need to call setTitle() method. Can you provide a code where you try to set it?



来源:https://stackoverflow.com/questions/16661061/how-to-manipulate-dynamic-objects-in-sencha-touch

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!