- Ext JS 4 Plugin and Extension Development
- Abdullah Al Mohammad
- 241字
- 2021-08-06 16:56:35
The ItemSelector extension
ItemSelector
is a specialized MultiSelect
field that renders as a pair with the MultiSelect
field; one with the available options and the other with the selected options. A set of buttons in between, allows the items to be moved between the fields and reordered within the selection. Also, they can be moved via drag-and–drop method.
Here, in the following code, a form panel class is defined, in which we are using the ItemSelector
extension as an item of this form:
Ext.define('Examples.view.itemselector.ItemSelectorFormPanel', { extend : 'Ext.form.Panel', alias : 'widget.itemselectorformpanel', requires : ['Ext.ux.form.ItemSelector'], constructor : function(config) { Ext.apply(this, { bodyPadding : 10, items : [{ anchor : '100%', xtype: 'itemselector', name: 'itemselector', store : Ext.create('Examples.store.DummyStore'), valueField : 'name', displayField : 'name', fromTitle: 'Available', toTitle: 'Selected' }] }); this.callParent(arguments); } });
You can see in the following screenshot that the ItemSelector
extension is a pair of MultiSelect
field where one is loaded with data store:

We can select the values from this available field and can move those values to the Selected field. We can use the arrow buttons or drag-and-drop, to move the values within those fields or reorder between those. If we use the getValue
function of this ItemSelector
extension, it will return the collection of values available at the Selected field.
The documentation for this extension is available at http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.ux.form.ItemSelector, where you will get all the available configuration options, properties, methods, and events for this extension.
- 深入淺出Windows API程序設計:編程基礎篇
- 小程序開發原理與實戰
- C語言程序設計
- 零基礎學單片機C語言程序設計
- 精通Linux(第2版)
- RabbitMQ Cookbook
- HTML5從入門到精通(第4版)
- Programming Microsoft Dynamics? NAV 2015
- App Inventor少兒趣味編程動手做
- 一步一步學Spring Boot:微服務項目實戰(第2版)
- Developing RESTful Web Services with Jersey 2.0
- The Python Apprentice
- Web前端開發全程實戰:HTML5+CSS3+JavaScript+jQuery+Bootstrap
- Instant Highcharts
- 深入理解TypeScript