首页 新闻 会员 周边 捐助

[Extjs]ItemSelector显示不出啊。。。

0
悬赏园豆:20 [已关闭问题] 关闭于 2014-12-26 09:10

如题。。话不多说帖代码。。。

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>


    <link href="../Scripts/ext-5.0.0.736/resources/ext-theme-crisp-all.css" rel="stylesheet" />
    <link href="../Scripts/example.css" rel="stylesheet" />
    <link href="../Scripts/ux/css/ItemSelector.css" rel="stylesheet" />    
    <script src="../Scripts/ext-5.0.0.736/ext-all.js"></script>
    <script src="../Scripts/ux/form/ItemSelector.js"></script>
    <script src="../Scripts/ux/form/MultiSelect.js"></script>

    <!--<link href="../Scripts/ux/css/ItemSelector.css" rel="stylesheet" />-->
    <script type="text/javascript">

        Ext.onReady(function () {

            Ext.QuickTips.init();
            Ext.form.Field.prototype.msgTarget = 'side';
            //数据
            var ds = new Ext.data.ArrayStore({
                data: [[123, 'One Hundred Twenty Three'],
                    ['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'],
                    ['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']],
                fields: ['value', 'text'],
                sortInfo: {
                    field: 'value',
                    direction: 'ASC'
                }
            });

            /*
             * Ext.ux.form.ItemSelector Example Code
             */
            var isForm = new Ext.form.FormPanel({
                title: 'ItemSelector Test',
                width: 700,
                bodyStyle: 'padding:10px;',
                renderTo: 'itemselector',
                items: [{
                    xtype: 'itemselector',
                    name: 'itemselector',
                    fieldLabel: 'ItemSelector',
                    imagePath: '../ux/images/',
                    multiselects: [{
                        width: 250,
                        height: 200,
                        store: ds,
                        displayField: 'text',
                        valueField: 'value'
                    }, {
                        width: 250,
                        height: 200,
                        store: [['10', 'Ten']],
                        tbar: [{
                            text: 'clear',
                            handler: function () {
                                isForm.getForm().findField('itemselector').reset();
                            }
                        }]
                    }]
                }],

                buttons: [{
                    text: 'Save',
                    handler: function () {
                        if (isForm.getForm().isValid()) {
                            Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />' +
                                isForm.getForm().getValues(true));//这里是获得value的值,取值应该是使用request,名字是itemselector
                        }
                    }
                }]
            });

        });


</script>
</head>
<body scroll="no" style="margin: 0; padding: 0; background-color: red;">
    <!--<div id="itemselector"></div>-->
   <!-- <div id="Div1"></div>-->
</body>
</html>

Ext及UX引用路径

求大神赐教。。。有小demo也行。。谢谢啦。。^^

BHongyi的主页 BHongyi | 初学一级 | 园豆:77
提问于:2014-12-22 09:28
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册