一、给GridPanel增加成两行toolbar

  1. tbar: {
  2. xtype: 'container',
  3. layout: 'anchor',
  4. defaults: {anchor: '0'},
  5. defaultType: 'toolbar',
  6. items: [{
  7. items: [...] // toolbar 1
  8. }, {
  9. items: [...] // toolbar 2
  10. }]
  11. }

二、去掉formPanel的边框

  1. var postForm = Ext.create('Ext.form.Panel', {
  2. style:'border-width:0 0 0 0;',

三、Grid SelectModel

  1. var grid = Ext.create('Ext.grid.Panel', {
  2. id: 'user_grid',
  3. selModel: Ext.create('Ext.selection.CheckboxModel',{mode: "MULTI"}),
  4.  
  5. var records = grid.getSelectionModel().getSelection();

四、store

  1. var store = Ext.create('Ext.data.JsonStore', {
  2. pageSize : Math.floor(clientHeight/25),
  3. proxy : {
  4. type : 'ajax',
  5. url : '/system_cases.do?method=getList',
  6. reader : {
  7. type : 'json',
  8. root : 'datas',
  9. totalProperty : 'sum',
  10. idProperty: "case_id"
  11. }
  12. },
  13. fields: ['case_id', 'case_name', 'case_des', 'enabled', 'create_user_name', 'create_dt']
  14. });

五、store reload传入搜索条件,适用于带条件翻页

  1. //extjs4
    store.on('beforeload',function(store, options){
  2. Ext.apply(store.proxy.extraParams, {
  3. 'log_info': Ext.getCmp('log_info').getValue(),
  4. 'start_date': Ext.getCmp("start_date").getValue(),
  5. 'end_date': Ext.getCmp("end_date").getValue()
  6. });
  7. });
  8.  
  9. //extjs3

store.on('beforeload',function(){
    Ext.apply(
        this.baseParams,
        {
            'fileDto.file.title':Ext.getCmp('title').getValue(),
            'fileDto.file.fileCodeNum':Ext.getCmp('fileCodeNum').getValue(),
            'fileDto.file.year':Ext.getCmp('year').getValue()
        }
    );
});

  1.  

六、checkbox以及radio

  1. var role_store = Ext.data.StoreManager.lookup('role_store');
  2. var user_role_store = Ext.create('Ext.data.JsonStore', {
  3. fields: ['users_id', 'role_id', 'users2role_id'],
  4. proxy: {
  5. type: 'ajax',
  6. //the store will get the content from the .json file
  7. url: '/system_user.do?method=getUserRoleList&users_id='+record.data.users_id,
  8. reader : {
  9. type : 'json',
  10. root : 'datas',
  11. totalProperty : 'sum',
  12. idProperty: "users2role_id"
  13. }
  14. }
  15. });
  16.  
  17. var role_data = new Array();
  18. role_store.each(function(record) {
  19. role_data.push({
  20. boxLabel: record.data.role_name,
  21. name: 'role_ids',
  22. inputValue: record.data.role_id
  23. });
  24. });
  25.  
  26. var checkGroup = {
  27. xtype: 'fieldset',
  28. title: '角色管理',
  29. layout: 'anchor',
  30. defaults: {
  31. anchor: '100%'
  32. },
  33. collapsible: true,
  34. collapsed: false,
  35. items: [{
  36. xtype: 'checkboxgroup',
  37. fieldLabel: '用户角色',
  38. name: 'user_role_group',
  39. //cls: 'x-check-group-alt',
  40. // Distribute controls across 3 even columns, filling each row
  41. // from left to right before starting the next row
  42. columns: 2,
  43. items: role_data
  44. }]
  45. };

  46. //将radio选择默认值
  47. postForm.getForm().findField("user_role_group").setValue({role_ids: user_role_array});

七、Grid提示

  1. {text: "略缩图", dataIndex: 'img',
  2. renderer: function(value, metaData, record, rowIndex, columnIndex, store) {
  3. var meta = "<img src='system/desktop/images/grid32x32.gif' />";
  4. metaData.tdAttr = 'data-qtip="' + meta +'"';
  5.  
  6. return '<img width="20" height="20" src="system/images/loading.gif" class="pic" errorimg="system/desktop/images/accordian.gif">';
  7.  
  8. }
  9. }
  1. //extjs3 的实现方式
    {header: "内容", width: 320, sortable: true, dataIndex: 'noteContent',
  2. renderer: function(value, metadata, record, rowIndex, columnIndex, store) {
  3. metadata.attr = 'ext:qtip="内容详细信息:<br/>' + value +'"';
  4. return value;
  5. }
  6. }

八、远程排序

Extjs4 的一些语法 持续更新中的更多相关文章

  1. Pig基础学习【持续更新中】

    *本文参考了Pig官方文档以及已有的一些博客,并加上了自己的一些知识性的理解.目前正在持续更新中.* Pig作为一种处理大规模数据的高级查询语言,底层是转换成MapReduce实现的,可以作为MapR ...

  2. Pig语言基础-【持续更新中】

      ***本文参考了Pig官方文档以及已有的一些博客,并加上了自己的一些知识性的理解.目前正在持续更新中.***   Pig作为一种处理大规模数据的高级查询语言,底层是转换成MapReduce实现的, ...

  3. 白话kubernetes的十万个为什么(持续更新中...) - kubernetes

    Kubernetes简称? 答:k8s或kube. Kubernetes是什么? 答:由Google开发的一个强大的平台,可以在集群环境中管理容器化应用程序.本质上是一种特殊的数据库,里面存储的是能够 ...

  4. git常用命令(持续更新中)

    git常用命令(持续更新中) 本地仓库操作git int                                 初始化本地仓库git add .                       ...

  5. Atom使用记录(持续更新中)

    部分内容取自:http://www.jianshu.com/p/dd97cbb3c22d,我自己也在使用,持续更新中 Atom安装插件在窗口中File---Setting---install 在里面进 ...

  6. java视频教程 Java自学视频整理(持续更新中...)

    视频教程,马士兵java视频教程,java视频 1.Java基础视频 <张孝祥JAVA视频教程>完整版[RMVB](东西网) 历经5年锤炼(史上最适合初学者入门的Java基础视频)(传智播 ...

  7. 系列文章:老项目的#iPhone6与iPhone6Plus适配#(持续更新中,更新日期2014年10月12日 星期日 )

    本文永久地址为http://www.cnblogs.com/ChenYilong/p/4020399.html ,转载请注明出处. ********************************** ...

  8. 知道创宇爬虫题--代码持续更新中 - littlethunder的专栏 - 博客频道 - CSDN.NET

    知道创宇爬虫题--代码持续更新中 - littlethunder的专栏 - 博客频道 - CSDN.NET undefined 公司介绍 - 数人科技 undefined

  9. Python开发【第二十三篇】:持续更新中...

    Python开发[第二十三篇]:持续更新中...

随机推荐

  1. window.location 对象中各种方法的用途

    一.简介 属性 描述 hash 从井号 (#) 开始的 URL(锚) host 主机名和当前 URL 的端口号 hostname 当前 URL 的主机名 href 完整的 URL pathname 当 ...

  2. STM32 STM32F4 寄存器怎么配置不上, 无法往寄存器写入数据

    当出现这个问题时,往往是因为你没有在RCC寄存器中把相关的时钟使能打开. 配置寄存器之前记得调用"RCC_AxxxPeriphClockCmd"先打开需要配置的时钟源,别调用了“R ...

  3. java中 ++a 与 a++ 的区别

    public static void main(String[] args) { int a = 5; a ++; System.out.println(a); int b = 5; ++ b; Sy ...

  4. IDA 远程调试设置

    第一步,先去 IDA   dbgsrv  这个目录下,找到要调试的那个远程计算机对应的可用客户端, 比如,android_server, 把它拷贝到目标计算机中, 比如 adb push .... 然 ...

  5. Expression表达式 实现and、or搜索

    用法: [HttpPost] public ActionResult GetBannerList(int pageIndex, int pageSize, string search) { Resul ...

  6. 【JZOJ3347】树的难题

    description analysis 比较麻烦树形\(DP\) 不过这个我还是不算很懂-- 下次要注意思考,不要怕麻烦 code #pragma GCC optimize("O3&quo ...

  7. HTML - 表单标签相关

    <html> <head></head> <body> <!-- 表单标签 : 收集其标签内部的数据, 提交给指定的服务器 action : 数据 ...

  8. 如何在屏幕上查看命令的输出以及在Linux中写入文件

    在Linux中输出命令可以做很多事情(http://www.nanke0834.com) 您可以将命令的输出分配给变量,将其发送到另一个命令/程序以通过管道进行处理或将其重定向到文件以进行进一步分析. ...

  9. springboot实现转发和重定向

    1.转发     方式一:使用 "forword" 关键字(不是指java关键字),注意:类的注解不能使用@RestController 要用@Controller @Reques ...

  10. centos 6 编译glibc-2.14

    1.查看系统版本, 升级系统基本lib库 [root@test ~]# cat /etc/redhat-release CentOS release 6.5 (Final) 2.查看系统glibc支持 ...