Extjs4.1.1 desktop动态加载桌面图标

    修改app.js:
        shortcuts: Ext.create('Ext.data.Store', {
            	//autoLoad:true,
                model: 'Ext.ux.desktop.ShortcutModel',
                proxy: {
    		    	type: 'ajax',
    		        url: 'desktopAction!createDesk.action',
    		        reader: {
    		            type: 'json',
    		            root: 'rows'
    		        }
    		    }
               /* data: [
                    { name: 'Grid Window', iconCls: 'grid-shortcut', module: 'grid-win' },
                    { name: 'Accordion Window', iconCls: 'accordion-shortcut', module: 'acc-win' },
                    { name: 'Notepad', iconCls: 'notepad-shortcut', module: 'notepad' },
                    { name: 'System Status', iconCls: 'cpu-shortcut', module: 'systemstatus'}
                ]*/
            })

 

在app.js下调用    
init: function() {
        // custom logic before getXYZ methods get called...

        this.callParent();
        
        this.desktop.shortcuts.load({
        });
        this.desktop.initShortcut();

    }

 

/**
 * 桌面快捷键
 *
 * @version sas-web v1.0
 * @author zhouhua, 2013-6-4
 */
@Entity
@Table(name="t_desktop")
public class Desktop {
    
    @Id
    private Integer did;
    private String name;
    private String iconCls;
    private String module;
    /**
     * @return the did
     */
    public Integer getDid() {
        return did;
    }
    /**
     * @param did the did to set
     */
    public void setDid(Integer did) {
        this.did = did;
    }
    /**
     * @return the iconCls
     */
    public String getIconCls() {
        return iconCls;
    }
    /**
     * @param iconCls the iconCls to set
     */
    public void setIconCls(String iconCls) {
        this.iconCls = iconCls;
    }
    /**
     * @return the name
     */
    public String getName() {
        return name;
    }
    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }
    /**
     * @return the module
     */
    public String getModule() {
        return module;
    }
    /**
     * @param module the module to set
     */
    public void setModule(String module) {
        this.module = module;
    }
    

}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值