- 浏览: 251468 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
liuyutingat163:
http://www.yee4.com/blog/27.htm ...
WIN7下jdk环境变量配置 -
liuyutingat163:
建议参考一篇更详细jdk安装和环境变量配置的教程jdk环境变量 ...
WIN7下jdk环境变量配置 -
liuyutingat163:
建议参考一篇更详细jdk安装和环境变量配置的教程[url=ht ...
WIN7下jdk环境变量配置 -
snails:
谢谢 讲解的很详细,这篇文章也不错JDK环境变量配置
WIN7下jdk环境变量配置 -
easonfans:
Jcson 写道以前学java的时候,不用设置"%J ...
WIN7下jdk环境变量配置
和大家分享一个我在www.extjs.com上找的插件,该插件可以执行客户端查询,说白了就是只能在本页做查询动作,没有和服务器交互.代码如下
- // vim: ts=4:sw=4:nu:fdc=4:nospell
- /**
- * Search plugin for Ext.grid.GridPanel, Ext.grid.EditorGrid ver. 2.x or subclasses of them
- *
- * @author Ing. Jozef Sakalos
- * @copyright (c) 2008, by Ing. Jozef Sakalos
- * @date 17. January 2008
- * @version $Id: Ext.ux.grid.Search.js 120 2008-03-31 00:09:05Z jozo $
- *
- * @license Ext.ux.grid.Search is licensed under the terms of
- * the Open Source LGPL 3.0 license. Commercial use is permitted to the extent
- * that the code/component(s) do NOT become part of another Open Source or Commercially
- * licensed development library or toolkit without explicit permission.
- *
- * License details: http://www.gnu.org/licenses/lgpl.html
- */
- /*global Ext */
- Ext.ns('Ext.ux.grid');
- /**
- * @class Ext.ux.grid.Search
- * @extends Ext.util.Observable
- * @param {Object} config configuration object
- * @constructor
- */
- Ext.ux.grid.Search = function(config) {
- Ext.apply(this, config);
- Ext.ux.grid.Search.superclass.constructor.call(this);
- }; // eo constructor
- Ext.extend(Ext.ux.grid.Search, Ext.util.Observable, {
- /**
- * @cfg {String} searchText Text to display on menu button
- */
- searchText:'Search'
- /**
- * @cfg {String} searchTipText Text to display as input tooltip. Set to '' for no tooltip
- */
- ,searchTipText:'Type a text to search and press Enter'
- /**
- * @cfg {String} selectAllText Text to display on menu item that selects all fields
- */
- ,selectAllText:'Select All'
- /**
- * @cfg {String} position Where to display the search controls. Valid values are top and bottom (defaults to bottom)
- * Corresponding toolbar has to exist at least with mimimum configuration tbar:[] for position:top or bbar:[]
- * for position bottom. Plugin does NOT create any toolbar.
- */
- ,position:'bottom'
- /**
- * @cfg {String} iconCls Icon class for menu button (defaults to icon-magnifier)
- */
- ,iconCls:'icon-magnifier'
- /**
- * @cfg {String/Array} checkIndexes Which indexes to check by default. Can be either 'all' for all indexes
- * or array of dataIndex names, e.g. ['persFirstName', 'persLastName']
- */
- ,checkIndexes:'all'
- /**
- * @cfg {Array} disableIndexes Array of index names to disable (not show in the menu), e.g. ['persTitle', 'persTitle2']
- */
- ,disableIndexes:[]
- /**
- * @cfg {String} dateFormat how to format date values. If undefined (the default)
- * date is formatted as configured in colummn model
- */
- ,dateFormat:undefined
- /**
- * @cfg {Boolean} showSelectAll Select All item is shown in menu if true (defaults to true)
- */
- ,showSelectAll:true
- /**
- * @cfg {String} mode Use 'remote' for remote stores or 'local' for local stores. If mode is local
- * no data requests are sent to server the grid's store is filtered instead (defaults to 'remote')
- */
- ,mode:'remote'
- /**
- * @cfg {Number} width Width of input field in pixels (defaults to 100)
- */
- ,width:100
- /**
- * @cfg {String} xtype xtype is usually not used to instantiate this plugin but you have a chance to identify it
- */
- ,xtype:'gridsearch'
- /**
- * @cfg {Object} paramNames Params name map (defaults to {fields:'fields', query:'query'}
- */
- ,paramNames: {
- fields:'fields'
- ,query:'query'
- }
- /**
- * @cfg {String} shortcutKey Key to fucus the input field (defaults to r = Sea_r_ch). Empty string disables shortcut
- */
- ,shortcutKey:'r'
- /**
- * @cfg {String} shortcutModifier Modifier for shortcutKey. Valid values: alt, ctrl, shift (defaults to alt)
- */
- ,shortcutModifier:'alt'
- /**
- * @cfg {String} align 'left' or 'right' (defaults to 'left')
- */
- /**
- * @cfg {Number} minLength force user to type this many character before he can make a search
- */
- /**
- * @cfg {Ext.Panel/String} toolbarContainer Panel (or id of the panel) which contains toolbar we want to render
- * search controls to (defaults to this.grid, the grid this plugin is plugged-in into)
- */
- // {{{
- /**
- * private
- * @param {Ext.grid.GridPanel/Ext.grid.EditorGrid} grid reference to grid this plugin is used for
- */
- ,init:function(grid) {
- this.grid = grid;
- // setup toolbar container if id was given
- if('string' === typeof this.toolbarContainer) {
- this.toolbarContainer = Ext.getCmp(this.toolbarContainer);
- }
- // do our processing after grid render and reconfigure
- grid.onRender = grid.onRender.createSequence(this.onRender, this);
- grid.reconfigure = grid.reconfigure.createSequence(this.reconfigure, this);
- } // eo function init
- // }}}
- // {{{
- /**
- * private add plugin controls to <b>existing</b> toolbar and calls reconfigure
- */
- ,onRender:function() {
- var panel = this.toolbarContainer || this.grid;
- var tb = 'bottom' === this.position ? panel.bottomToolbar : panel.topToolbar;
- // add menu
- this.menu = new Ext.menu.Menu();
- // handle position
- if('right' === this.align) {
- tb.addFill();
- }
- else {
- tb.addSeparator();
- }
- // add menu button
- tb.add({
- text:this.searchText
- ,menu:this.menu
- ,iconCls:this.iconCls
- });
- // add input field (TwinTriggerField in fact)
- this.field = new Ext.form.TwinTriggerField({
- width:this.width
- ,selectOnFocus:undefined === this.selectOnFocus ? true : this.selectOnFocus
- ,trigger1Class:'x-form-clear-trigger'
- ,trigger2Class:'x-form-search-trigger'
- ,onTrigger1Click:this.onTriggerClear.createDelegate(this)
- ,onTrigger2Click:this.onTriggerSearch.createDelegate(this)
- ,minLength:this.minLength
- });
- // install event handlers on input field
- this.field.on('render', function() {
- this.field.el.dom.qtip = this.searchTipText;
- // install key map
- var map = new Ext.KeyMap(this.field.el, [{
- key:Ext.EventObject.ENTER
- ,scope:this
- ,fn:this.onTriggerSearch
- },{
- key:Ext.EventObject.ESC
- ,scope:this
- ,fn:this.onTriggerClear
- }]);
- map.stopEvent = true;
- }, this, {single:true});
- tb.add(this.field);
- // reconfigure
- this.reconfigure();
- // keyMap
- if(this.shortcutKey && this.shortcutModifier) {
- var shortcutEl = this.grid.getEl();
- var shortcutCfg = [{
- key:this.shortcutKey
- ,scope:this
- ,stopEvent:true
- ,fn:function() {
- this.field.focus();
- }
- }];
- shortcutCfg[0][this.shortcutModifier] = true;
- this.keymap = new Ext.KeyMap(shortcutEl, shortcutCfg);
- }
- } // eo function onRender
- // }}}
- // {{{
- /**
- * private Clear Trigger click handler
- */
- ,onTriggerClear:function() {
- this.field.setValue('');
- this.field.focus();
- this.onTriggerSearch();
- } // eo function onTriggerClear
- // }}}
- // {{{
- /**
- * private Search Trigger click handler (executes the search, local or remote)
- */
- ,onTriggerSearch:function() {
- if(!this.field.isValid()) {
- return;
- }
- var val = this.field.getValue();
- var store = this.grid.store;
- // grid's store filter
- if('local' === this.mode) {
- store.clearFilter();
- if(val) {
- store.filterBy(function(r) {
- var retval = false;
- this.menu.items.each(function(item) {
- if(!item.checked || retval) {
- return;
- }
- var rv = r.get(item.dataIndex);
- rv = rv instanceof Date ? rv.format(this.dateFormat || r.fields.get(item.dataIndex).dateFormat) : rv;
- var re = new RegExp(val, 'gi');
- retval = re.test(rv);
- }, this);
- if(retval) {
- return true;
- }
- return retval;
- }, this);
- }
- else {
- }
- }
- // ask server to filter records
- else {
- // clear start (necessary if we have paging)
- if(store.lastOptions && store.lastOptions.params) {
- store.lastOptions.params[store.paramNames.start] = 0;
- }
- // get fields to search array
- var fields = [];
- this.menu.items.each(function(item) {
- if(item.checked) {
- fields.push(item.dataIndex);
- }
- });
- // add fields and query to baseParams of store
- delete(store.baseParams[this.paramNames.fields]);
- delete(store.baseParams[this.paramNames.query]);
- if (store.lastOptions && store.lastOptions.params) {
- delete(store.lastOptions.params[this.paramNames.fields]);
- delete(store.lastOptions.params[this.paramNames.query]);
- }
- if(fields.length) {
- store.baseParams[this.paramNames.fields] = Ext.encode(fields);
- store.baseParams[this.paramNames.query] = val;
- }
- // reload store
- store.reload();
- }
- } // eo function onTriggerSearch
- // }}}
- // {{{
- /**
- * @param {Boolean} true to disable search (TwinTriggerField), false to enable
- */
- ,setDisabled:function() {
- this.field.setDisabled.apply(this.field, arguments);
- } // eo function setDisabled
- // }}}
- // {{{
- /**
- * Enable search (TwinTriggerField)
- */
- ,enable:function() {
- this.setDisabled(false);
- } // eo function enable
- // }}}
- // {{{
- /**
- * Enable search (TwinTriggerField)
- */
- ,disable:function() {
- this.setDisabled(true);
- } // eo function disable
- // }}}
- // {{{
- /**
- * private (re)configures the plugin, creates menu items from column model
- */
- ,reconfigure:function() {
- // {{{
- // remove old items
- var menu = this.menu;
- menu.removeAll();
- // add Select All item plus separator
- if(this.showSelectAll) {
- menu.add(new Ext.menu.CheckItem({
- text:this.selectAllText
- ,checked:!(this.checkIndexes instanceof Array)
- ,hideOnClick:false
- ,handler:function(item) {
- var checked = ! item.checked;
- item.parentMenu.items.each(function(i) {
- if(item !== i && i.setChecked) {
- i.setChecked(checked);
- }
- });
- }
- }),'-');
- }
- // }}}
- // {{{
- // add new items
- var cm = this.grid.colModel;
- Ext.each(cm.config, function(config) {
- var disable = false;
- if(config.header && config.dataIndex) {
- Ext.each(this.disableIndexes, function(item) {
- disable = disable ? disable : item === config.dataIndex;
- });
- if(!disable) {
- menu.add(new Ext.menu.CheckItem({
- text:config.header
- ,hideOnClick:false
- ,checked:'all' === this.checkIndexes
- ,dataIndex:config.dataIndex
- }));
- }
- }
- }, this);
- // }}}
- // {{{
-
<span
发表评论
-
ext messagebox同步问题
2009-08-25 19:50 0http://www.xue5.com/itedu/20080 ... -
ext grid双击获得选中的cell内容
2009-08-22 21:51 4314function rowdblclickFn(grid, ... -
Ext Grid上的单击以及双击事件
2009-08-22 19:33 17007进来项目中需要使用双击/单击行记录来获取数据,将实现的方式记录 ... -
ext 中的iconCls配置以及使用以及路径问题
2009-08-22 14:42 17833首先是ext的iconCls配置问 ... -
Ext的Grid导出为Excel 方法
2009-08-16 19:26 4505转载的一个extjs的grid数据生成excel的好方法,这里 ... -
怎样获得JSON语句中的属性值
2009-08-15 17:14 4152How to read property's value in ... -
grid 解析json
2009-08-14 21:02 1380对于网上EXT的学习,大多提到json数据的接受问题,但是很少 ... -
ExtJS实战(8)-CRUD+分页+复杂查询+排序
2009-08-08 21:27 3189现在开始进入CRUD+分页+ ... -
extjs grid搜索分页实例
2009-08-08 00:04 3189extjs grid搜索分页实例 最近要做一个extjs.g ...
相关推荐
这是一个关于ajax的框架, 是一个富客户端的技术,希望对大家有用!
ExtJS初学者,学习的一个不错的例子,一看就懂,很不错的; ExtJS初学者,学习的一个不错的例子,一看就懂,很不错的; ExtJS初学者,学习的一个不错的例子,一看就懂,很不错的
ExtJs,客户端开发技术,以后可能会发展为主流客户端框架,界面非常美观,希望大家能够深入学习
extJS ext 自学 富客户端,掏钱自学extjs。
extjs 富客户端界面设计 grid分页后台处理
EXTJS4自学手册——EXT数据结构组件(proxy代理类之客户端代理) EXTJS4自学手册——EXT数据结构组件(proxy代理类之服务器端代理) EXTJS4自学手册——EXT数据结构组件(store) 三、Extjs布局 EXTJS4自学手册——...
ExtJS 是一个很不错的Ajax 框架,可以用来开发带有华丽外观的富客户端应用,ExtJS 是一个用javascript 编写,与后台技术无关的前端ajax 框架。可以把ExtJS 用在.Net、Java、Php 等各种开发语言开发的应用中。教程...
javascript 写的 用于在客户端创建丰富多彩的 web 应用程序界面 ExtJS 可以用来开发 RIA Rich Internet Application 富互联网应用系统 的 开源 AJAX 应用框架 使用的开源协 议是 GPL ExtJS 是一个用 javascript 写...
资源名称:ExtJS布局之border实例内容简介:border布局是常见的布局样式,本文档中一个实际项目的示例,比较简单,仅供初学者参考。感兴趣的朋友可以过来看看。自动生成行号,支持checkbox全选,动态选择显示哪些列...
extjs是一套完整的富客户端解决方案,也因为功能完整,造成ext-all.js有400多k,请注意,这还是压缩后的大小,而且因为是基于js和css的功能实现,对客户端机器性能也有一定的要求,比如不支持ie6以下的版本。...
您刚刚下载EnterpriseExtjs.rar中,包含WMC2.0-Client.zip文件,... 并且WMC2.0-Client.zip作为客户端开发框架,您是不需要写任何代码的,我们提供代码生成器帮助你实现基于EntityFramework+Extjs+MVC架构的快速开发。
Extjs是一个富客户端的JS脚本Extjs是一个富客户端的JS脚本
ExtJS是一个很不错的Ajax框架,可以用来开发带有华丽外观的富客户端应用,使得我们的b/s应用更加具有活力及生命力.ExtJS是一个用javascript编写,与后台技术无关的前端ajax框架.因此,可以把ExtJS用在.Net、Java、Php等...
ExtJS是一个很不错的Ajax框架,可以用来开发带有华丽外观的富客户端应用,使得我们的b/s应用更加具有活力及生命力。ExtJS是一个用javascript编写,与后台技术无关的前端ajax框架。因此,可以把ExtJS用在.Net、Java、...
ExtJS 是一个很不错的Ajax 框架,可以用来开发带有华丽外观的富客户端应用,使得我 们的b/s 应用更加具有活力及生命力。ExtJS 是一个用javascript 编写,与后台技术无关的前 端ajax 框架。因此,可以把ExtJS 用在...
extjs是个很好的js框架。里面含有好多的例子。你能绘制好多不同种类的图形。
ExtJS可以用来开发RIA也即富客户端的AJAX应用,是一个用javascript写的,主要用于创建前端用户界面,是一个与后台技术无关的前端 ajax框架。因此,可以把ExtJS用在.Net、Java、Php等各种开发语言开发的应用中。ExtJs...
最前版本的extjs4框架,包含大量示例以及框架源代码,方便学习掌握EXTJS最新精髓和架构思想。
extjs源代码用于开发客户端,并时界面更加的友好,此源代码是extjs3.1.1版本的,用户可以更好的学习
支持富客户端extjs技术 绚丽的报表图形