In this section, you will learn how to build ext JS extensions.
在这一小节,您将学习如何构建Ext JS扩展。
An extension for ext JS is a derived class or a subclass, which is designed to allow the inclusion of additional features to existing ext JS classes.
Ext JS的扩展是从类或者子类衍生出来的,为支持现有Ext JS类包含附加特性而设计的。
Thankfully, ext JS includes a powerful class and component ecosystem that makes it easy to extend existing features or build new components entirely.
谢天谢地,Ext JS包含一个功能强大的类和组件生态系统,可以轻松地扩展现有特性或者完全构建新组件。
User extensions in ext JS usually are in the namespace Ext.ux, so look out for this when trying to find the source code for an extension.
用户在Ext JS中的扩展通常是在名称空间Ext .ux中,因此在您试着寻找一个扩展的源代码时要留意这一点。
Available as a user extension (UX) in ext JS, you can now perform edits to a grid at the row level, as shown in Figure 1.
作为Ext JS中的用户扩展(UX),现在可以进行行级编辑,如图1所示。
When a container is resized so that a toolbar's items are clipped, ext JS automatically handles this overflow by creating a menu of the extra toolbar items.
当容器缩放导致工具栏项目切除时,Ext JS通过创建额外工具栏项目菜单来自动处理这种溢出。
Listing 6 shows a typical ext JS Ajax implementation: an HTML text field and button element that posts data in the text field to a Web server when the button is clicked.
清单6给出一个典型的Ext JSAjax实现:当单击按钮时,HTML文本框和按钮元素把文本框中的数据发送给Web服务器。
Using existing Ext JS plug-ins.
使用已有Ext JS插件。
In this section, you will learn how to build an Ext JS plug-in.
在本小节,我们将学习如何构建一个Ext JS插件。
You can find existing Ext JS extensions and plug-ins in a couple of ways.
找到现有Ext JS扩展和插件有很多种方法。
The plug-in is very simple: It contains the basic requirements of an Ext JS plug-in.
这个插件非常简单:包含一个Ext JS插件的基本需求。
As shown in Figure 3, Ext JS also provides tree controls, which provide users with a familiar file system-like view.
如图3所示,Ext JS还提供树控件,这种控件提供用户熟悉的与文件系统相似的视图。
Jesus: I began with ext JS back in early 2006, when it was a set of extensions for the YUI library.
Jesus:我从2006年初就开始使用ExtJS,当时它只是YUI库的一个扩展集。
This is a very basic example of an ext JS extension, but it could easily be extended further to include some more features.
这是Ext JS扩展的一个最基础的示例,但是它很容易进一步扩展来包括一些更多的特性。
With the basics learned in this article, you should now be ready to start learning about more complex concepts in Ext JS extension and plug-in development.
在本文中学习了这些基础理论之后,您就可以开始学习一些更复杂的Ext JS扩展和插件开发的概念了。
A nice feature of using plug-ins in Ext JS is that multiple plug-ins can be attached to a single component, providing additional functionality as required.
在Ext JS中使用组件的一个特点就是,多个插件可以被附加到一个组件上,根据需要提供附加功能。
At first it can be difficult to appreciate the difference between an extension and a plug-in in ext JS, particularly given their similarities in terms of what they do.
首先,在Ext JS中很难分辨扩展和插件之间的不同,尤其是考虑到它们在使用时的相似性。
The ext-all.js file includes the entire ext js framework.
ext - all .js包含整个ext js框架。
Ext JS keeps its promise with an easy-to-use development model.
Ext JS通过一个易用的开发模型实现了它的承诺。
Ext JS provides excellent performance.
Ext JS提供出色的性能。
Is Ext JS suitable for mobile web applications?
Ext JS适合移动web应用吗?
Although this article addresses Ext JS 3.1, the recent release of Ext JS 3.2 deserves a mention for some of the cooler features.
尽管本文介绍Ext JS 3.1,最新的Ext JS 3.2中一些更酷的特性却值得一提。
Although this new distribution is merely an abstraction of the full Ext JS library, it does bring a new mindset to development with Ext JS.
尽管这个新的发行版仅仅是完整Ext js库的抽象,但却引入了Ext JS开发的新思维。
Another big and completely new feature to Ext JS is charting.
Ext JS中另一个大的全新特性就是图表。
InfoQ: What is your preferred process for developing an Ext JS application?
InfoQ:对于开发Ext JS应用,你喜欢哪种过程?
Developers should appreciate the well-thought-out design and implementation of Ext JS.
开发人员应该会喜欢Ext JS经过深思熟虑的设计和实现。
Ext JS includes controls such as message boxes, combo boxes, data grids, and toolbars.
Ext JS包含消息框、组合框、数据网格和工具栏等控件。
Ext JS provides you with a rich set of tools to create interactive forms.
Ext JS提供一组用来创建交互式表单的工具。
Perhaps one of the most powerful Ext JS UI elements is the grid control.
最强大的Ext JS用户界面元素可能是网格控件。
As shown in Figure 4, Ext JS grids can implement paging and column sorting.
如图4所示,Ext JS网格可以实现分页和列排序。
应用推荐