English 中文(简体)
如何定义并发送变量?
原标题:How to define and send variable?

与新Sencha Touch 2 和我有问题的工作 与拖拉机,json,等等...

很简单,但我不能采取解决方案。

我有一个由Json完成的名单。这个json来自Drupal7 视图,以json格式。

在我看来,我有类似的东西:

var listaArtistas = {
        xtype:  list ,
        title:  Artistas ,
        height: 240,
        store: {
            autoLoad: true,
            fields: [ node ],
            proxy: {
                type:  ajax ,
                url:  http://localhost/json-artistas ,

                reader: {
                    type:  json ,
                    rootProperty:  nodes 
                }
            }
        },
        listeners: {
            itemtap: function(lista,index,target,record,e,eOpts)
            {

                var artistDetail = new Ext.create( app.view.ArtistDetail );

                panelHomeNav.push(artistDetail);

            }
        },

        itemTpl: tpl

        };

这个代码对我管用 完全取消艺术家的名单

现在,我点击艺术家,然后转到另一个观点(艺术家Detail ) 。 但是,要正确显示这个列表,并列出艺术家的详细情况,就需要我以前喜欢的艺术家的身份。

我需要在艺术家Detail.. url: http://localhost/json-artistasDetail +NID, 国家ID是先前名单上的艺术家的身份。

我不知道如何在Sencha的两个观点之间通过这个参数

感谢您的帮助... 或读:D

最佳回答

许多选项是可能的, 这里是一个: 在创建详细视图后, 您可以设置一个专用属性, 例如 :

var artistDetail = new Ext.create( app.view.ArtistDetail );
artistDetail.setArtistID(artistID);
panelHomeNav.push(artistDetail);
问题回答

暂无回答




相关问题
Sencha touch 2.0 can t set activeitem on viewport

I am playing with sencha touch 2.0 at the moment and i am having the following problem. I am trying to set the activeitem on my viewport but according to my debug console the function is not being ...

Refreshing the screen while card switch in sencha touch

I have a screen where the formBase contains all of the dynamically created UI controls. I am using card layout and switching between views. Now it so happened that I have to execute the formBase for ...

Fire event from hyperlink in Sencha Touch 2

How would I fire an event (I am wanting to switch card views) from a plain old html link? If I reference the link by ID in my controls section no event I tried (click, tap) seems to be triggered. ...

Remove a Sencha Touch 2 component

What is the correct way of removing a component I know I m not going to use anymore, but I want to use new instances of the same class later? For example, a create form is added to the viewport using ...

Using XTempate with Sencha Touch 2

So working though the mostly absent docs on templates - unable to get it to work. Ext.define( MyAPp.view.Login , { extend: Ext.Component , xtype: welcomeLogin , config: { html: ...

Sencha Touch 2 and SDK for PC

Looking at the website, there seems to only be a link to SDK for a MAC environment, will there be one for a PC environment shortly for the Sencha Touch 2 SDK? Thanks M

How to properly activate an MVC View in Sencha Touch V2

I m running Sencha Touch V2 beta and I m looking at the most recent documentation. I ve followed the Ext.application instructions and am trying to properly lay out my MVC application. Unfortunately I ...

热门标签