Extjs4 的一些语法 持续更新中
一、给GridPanel增加成两行toolbar
- tbar: {
- xtype: 'container',
- layout: 'anchor',
- defaults: {anchor: '0'},
- defaultType: 'toolbar',
- items: [{
- items: [...] // toolbar 1
- }, {
- items: [...] // toolbar 2
- }]
- }
二、去掉formPanel的边框
- var postForm = Ext.create('Ext.form.Panel', {
- style:'border-width:0 0 0 0;',
三、Grid SelectModel
- var grid = Ext.create('Ext.grid.Panel', {
- id: 'user_grid',
- selModel: Ext.create('Ext.selection.CheckboxModel',{mode: "MULTI"}),
- var records = grid.getSelectionModel().getSelection();
四、store
- var store = Ext.create('Ext.data.JsonStore', {
- pageSize : Math.floor(clientHeight/25),
- proxy : {
- type : 'ajax',
- url : '/system_cases.do?method=getList',
- reader : {
- type : 'json',
- root : 'datas',
- totalProperty : 'sum',
- idProperty: "case_id"
- }
- },
- fields: ['case_id', 'case_name', 'case_des', 'enabled', 'create_user_name', 'create_dt']
- });
五、store reload传入搜索条件,适用于带条件翻页
- //extjs4
store.on('beforeload',function(store, options){- Ext.apply(store.proxy.extraParams, {
- 'log_info': Ext.getCmp('log_info').getValue(),
- 'start_date': Ext.getCmp("start_date").getValue(),
- 'end_date': Ext.getCmp("end_date").getValue()
- });
- });
- //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()
}
);
});
六、checkbox以及radio
- var role_store = Ext.data.StoreManager.lookup('role_store');
- var user_role_store = Ext.create('Ext.data.JsonStore', {
- fields: ['users_id', 'role_id', 'users2role_id'],
- proxy: {
- type: 'ajax',
- //the store will get the content from the .json file
- url: '/system_user.do?method=getUserRoleList&users_id='+record.data.users_id,
- reader : {
- type : 'json',
- root : 'datas',
- totalProperty : 'sum',
- idProperty: "users2role_id"
- }
- }
- });
- var role_data = new Array();
- role_store.each(function(record) {
- role_data.push({
- boxLabel: record.data.role_name,
- name: 'role_ids',
- inputValue: record.data.role_id
- });
- });
- var checkGroup = {
- xtype: 'fieldset',
- title: '角色管理',
- layout: 'anchor',
- defaults: {
- anchor: '100%'
- },
- collapsible: true,
- collapsed: false,
- items: [{
- xtype: 'checkboxgroup',
- fieldLabel: '用户角色',
- name: 'user_role_group',
- //cls: 'x-check-group-alt',
- // Distribute controls across 3 even columns, filling each row
- // from left to right before starting the next row
- columns: 2,
- items: role_data
- }]
- };
//将radio选择默认值- postForm.getForm().findField("user_role_group").setValue({role_ids: user_role_array});
七、Grid提示
- {text: "略缩图", dataIndex: 'img',
- renderer: function(value, metaData, record, rowIndex, columnIndex, store) {
- var meta = "<img src='system/desktop/images/grid32x32.gif' />";
- metaData.tdAttr = 'data-qtip="' + meta +'"';
- return '<img width="20" height="20" src="system/images/loading.gif" class="pic" errorimg="system/desktop/images/accordian.gif">';
- }
- }
- //extjs3 的实现方式
{header: "内容", width: 320, sortable: true, dataIndex: 'noteContent',- renderer: function(value, metadata, record, rowIndex, columnIndex, store) {
- metadata.attr = 'ext:qtip="内容详细信息:<br/>' + value +'"';
- return value;
- }
- }
八、远程排序
Extjs4 的一些语法 持续更新中的更多相关文章
- Pig基础学习【持续更新中】
*本文参考了Pig官方文档以及已有的一些博客,并加上了自己的一些知识性的理解.目前正在持续更新中.* Pig作为一种处理大规模数据的高级查询语言,底层是转换成MapReduce实现的,可以作为MapR ...
- Pig语言基础-【持续更新中】
***本文参考了Pig官方文档以及已有的一些博客,并加上了自己的一些知识性的理解.目前正在持续更新中.*** Pig作为一种处理大规模数据的高级查询语言,底层是转换成MapReduce实现的, ...
- 白话kubernetes的十万个为什么(持续更新中...) - kubernetes
Kubernetes简称? 答:k8s或kube. Kubernetes是什么? 答:由Google开发的一个强大的平台,可以在集群环境中管理容器化应用程序.本质上是一种特殊的数据库,里面存储的是能够 ...
- git常用命令(持续更新中)
git常用命令(持续更新中) 本地仓库操作git int 初始化本地仓库git add . ...
- Atom使用记录(持续更新中)
部分内容取自:http://www.jianshu.com/p/dd97cbb3c22d,我自己也在使用,持续更新中 Atom安装插件在窗口中File---Setting---install 在里面进 ...
- java视频教程 Java自学视频整理(持续更新中...)
视频教程,马士兵java视频教程,java视频 1.Java基础视频 <张孝祥JAVA视频教程>完整版[RMVB](东西网) 历经5年锤炼(史上最适合初学者入门的Java基础视频)(传智播 ...
- 系列文章:老项目的#iPhone6与iPhone6Plus适配#(持续更新中,更新日期2014年10月12日 星期日 )
本文永久地址为http://www.cnblogs.com/ChenYilong/p/4020399.html ,转载请注明出处. ********************************** ...
- 知道创宇爬虫题--代码持续更新中 - littlethunder的专栏 - 博客频道 - CSDN.NET
知道创宇爬虫题--代码持续更新中 - littlethunder的专栏 - 博客频道 - CSDN.NET undefined 公司介绍 - 数人科技 undefined
- Python开发【第二十三篇】:持续更新中...
Python开发[第二十三篇]:持续更新中...
随机推荐
- window.location 对象中各种方法的用途
一.简介 属性 描述 hash 从井号 (#) 开始的 URL(锚) host 主机名和当前 URL 的端口号 hostname 当前 URL 的主机名 href 完整的 URL pathname 当 ...
- STM32 STM32F4 寄存器怎么配置不上, 无法往寄存器写入数据
当出现这个问题时,往往是因为你没有在RCC寄存器中把相关的时钟使能打开. 配置寄存器之前记得调用"RCC_AxxxPeriphClockCmd"先打开需要配置的时钟源,别调用了“R ...
- java中 ++a 与 a++ 的区别
public static void main(String[] args) { int a = 5; a ++; System.out.println(a); int b = 5; ++ b; Sy ...
- IDA 远程调试设置
第一步,先去 IDA dbgsrv 这个目录下,找到要调试的那个远程计算机对应的可用客户端, 比如,android_server, 把它拷贝到目标计算机中, 比如 adb push .... 然 ...
- Expression表达式 实现and、or搜索
用法: [HttpPost] public ActionResult GetBannerList(int pageIndex, int pageSize, string search) { Resul ...
- 【JZOJ3347】树的难题
description analysis 比较麻烦树形\(DP\) 不过这个我还是不算很懂-- 下次要注意思考,不要怕麻烦 code #pragma GCC optimize("O3&quo ...
- HTML - 表单标签相关
<html> <head></head> <body> <!-- 表单标签 : 收集其标签内部的数据, 提交给指定的服务器 action : 数据 ...
- 如何在屏幕上查看命令的输出以及在Linux中写入文件
在Linux中输出命令可以做很多事情(http://www.nanke0834.com) 您可以将命令的输出分配给变量,将其发送到另一个命令/程序以通过管道进行处理或将其重定向到文件以进行进一步分析. ...
- springboot实现转发和重定向
1.转发 方式一:使用 "forword" 关键字(不是指java关键字),注意:类的注解不能使用@RestController 要用@Controller @Reques ...
- centos 6 编译glibc-2.14
1.查看系统版本, 升级系统基本lib库 [root@test ~]# cat /etc/redhat-release CentOS release 6.5 (Final) 2.查看系统glibc支持 ...