zoukankan      html  css  js  c++  java
  • extJSitemselector的使用


     

    extJS-itemselector的使用 - adyhpq - adyhpq的个人主页

     
     

    上图是富客户端界面中常用的选择方式,下面是项目中的一段示例代码,仅供初学者参考:

     


    Js代码 复制代码
    var _smsTemplateToStore = new Ext.data.Store({   
        id:"_smsTemplateToStore",   
        proxy : new Ext.data.HttpProxy({url:"modelSelectedData.jsp"}),   
        reader: new Ext.data.JsonReader({   
            totalProperty:"totalProperty",   
            root:"root"},   
        [   
            {name:"code"},   
            {name:"desc"}   
                ]   
        )   
        });    
           
           
        var _smsTemplateFromStore = new Ext.data.Store({   
            id:"_smsTemplateToStore",   
            proxy : new Ext.data.HttpProxy({url:"moduleUnSelectedData.jsp"}),   
      
            reader: new Ext.data.JsonReader({   
                totalProperty:"totalProperty",   
                root:"root"},   
                [   
        {name:"code"},   
        {name:"desc"}   
            )   
    });   
      
      
      
    var _toolbarStudyClassTypeNodes = new Ext.Toolbar({   
        items:[ {   
        text:"保存",   
        pressed : true,   
        iconCls : 'icon-table-save',   
        handler:function(){   
            saveRelation();   
        }   
        }]   
               
    });   
      
      
    var isForm = new Ext.form.FormPanel({   
            title: '班型-模块列表选择',   
            // bodyWidth-180,   
            height: 340,   
            bodyStyle: 'padding:5px;',   
            tbar:_toolbarStudyClassTypeNodes,   
               
            items:[{   
                xtype:"itemselector",   
                name:"itemselector",   
                fieldLabel:"信息",   
                //labelWidth:1,   
                dataFields:["code", "desc"],   
                toData:[],   
                msWidth:220,   
                msHeight:260,   
                valueField:"code",   
                displayField:"desc",   
                imagePath:"../images/",   
                toLegend:"已选择",   
                fromLegend:"待选择",   
                fromData:[],   
                fromStore:_smsTemplateFromStore,   
                toStore:_smsTemplateToStore            
            }]   
        });   
      
      
    var _panelStudyClassTypeNodes = new Ext.Panel({   
        collapsible:true,   
        bodyWidth-180,   
        height:350,        
        autoScroll:true,   
               
        items:[isForm]   
    });

  • 相关阅读:
    Begin Example with Override Encoded SOAP XML Serialization
    State Machine Terminology
    How to: Specify an Alternate Element Name for an XML Stream
    How to: Publish Metadata for a WCF Service.(What is the Metadata Exchange Endpoint purpose.)
    Beginning Guide With Controlling XML Serialization Using Attributes(XmlSerializaiton of Array)
    Workflow 4.0 Hosting Extensions
    What can we do in the CacheMetaData Method of Activity
    How and Why to use the System.servicemodel.MessageParameterAttribute in WCF
    How to: Begin Sample with Serialization and Deserialization an Object
    A Test WCF Service without anything of config.
  • 原文地址:https://www.cnblogs.com/shanmu/p/2133768.html
Copyright © 2011-2022 走看看