extjs4 panel下tools里的元素选择器

今天在做项目中,遇到了选择panel下 tools里的一个button元素,搞了半天,终于试出来了,为了将来便于查看,记录如下:

panel结构如下:

{
     xtype: 'panel', 
     title: '联网状态',
     action: 'netStatus',
     border: 0,
     width: '100%',
     layout: 'fit',
     flex: 2,
     tools: [
                {
        xtype: 'numberfield',
        name : 'refreshTime',
        action : 'timeAction',
        fieldLabel: '刷新时间(秒)',
        labelAlign: 'right',
        step: 1,
                                maxValue: 9999,
                                minValue: 0
       }
                ,{
                 xtype : 'button',
                 action : 'refreshBtn',
                 text : '刷新',
                 margin : '0 0 0 5'
                }
                  ],
     items:[{
          xtype: 'dataview',
          store: 'SOnlineState',
          autoScroll : true,
       tpl : Ext.create('Ext.XTemplate',
        '<div class="dataset_out_panel">',
        ' <tpl for=".">', 
           '<div class="dataset_out">',
              '<div class="form_icon_a">',
                   '<img src="{src}" title= "{orgName}" /><br><span>{orgName}</span>',
              '</div>',
           '</div>',
           ' </tpl>',
           '<div class="clear"></div>',
         '</div>'
       ),
          emptyText: 'No images available'
      }]

    }

拿到刷新按钮的选择器: panel[action="netStatus"] button[action="refreshBtn"]

转载于:https://my.oschina.net/crazybird/blog/273339

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值