extjs

Multiselect search whole string

大憨熊 提交于 2019-12-19 12:51:34
问题 I have a multiselect with search bound to a store (with attribute string_value). Search only searches strings that start with "string to search" instead of contains "string to search" (similar to searching for '%string%' instead of 'string%'). Is there a way to do this by extending 'multiselector-search'? Below is my multiselector control bound to a form: var ms = Ext.widget('form', { xtype: 'multi-selector', width: 400, height: 300, requires: [ 'Ext.view.MultiSelector' ], layout: 'fit',

Trying to load data that is being passed by using a store

青春壹個敷衍的年華 提交于 2019-12-19 11:57:10
问题 I am trying to get data that is being passed and load it into various textfields. Right now, I have a .html file which contains this: <script type="text/javascript"> var res = {"address":"","city":"","state":"","zip":""}; </script> Then, I have a .js file which contains my entire layout with all the textfields, etc. and my entire store. This is what I have so far as my store trying to load the data, but I am not sure what the correct method is to try and get the data from the html file and

Filtering a Ext.data.Store by a particular id returns multiple results

老子叫甜甜 提交于 2019-12-19 11:34:48
问题 I'm trying to filter my list of auditions by show ID but when the show ID is '1' all auditions that have a show Id of '1x' are being returned. Below is my code. Audition Model: Ext.regModel("Audition", { fields: [ {name: "id", type: "integer"}, {name: "show_id", type: "integer"}, {name: "date", type: "string"}, {name: "details", type: "string"} ], belongsTo: 'Show', proxy: { type: 'ajax', url : 'app/data/auditions.json', reader: { type: 'json', root: 'auditions', id : 'id' } }, }); app.stores

Retain the already present value of the cell for edit on click

瘦欲@ 提交于 2019-12-19 11:20:03
问题 I've a grid cloumn with xtype:datecolumn as below, Now what happens is when i want to alter the value of the cell , i.e change the time on click the cell becomes blank for editing and on clicking way the previous value comes back, I want the value to be present to edit on click this is my gridcolumn { text: ' Time', dataIndex: 'time', xtype: 'datecolumn', format: 'Y-m-d H:i:s', editor: { xtype: 'datefield', format: 'Y-m-d H:i:s', allowBlank: false, maskRe: /[0-9,:,-]/ } }, How will I be

What is the best way to display text just after a TextField?

落爺英雄遲暮 提交于 2019-12-19 09:56:22
问题 I'm creating a formpanel with items created via xtype (not calling new for each items). I'd like to add a precision at the right of the TextField. I managed to do it by setting a CompositeField containing the TextField + a standard Panel, but is there a better way, like a property in the TextField I would have missed or a better alternative ? Thanks for your help ! :) new Ext.form.FormPanel ({ 'id': 'create-form', 'header': true, 'headerAsText': true, 'hideCollapseTool': true, 'title': 'New

Stock chart in ExtJS 4

荒凉一梦 提交于 2019-12-19 09:24:51
问题 How can I draw an stock chart or a line chart with hundreds points? I disabled animation in regular line chart, but not successful and still too heavy and slow. 回答1: I've recently written a blog post on creating stock charts in Ext JS 4 - http://www.scottlogic.co.uk/2011/12/ext-js-4-stock-charts/. It uses a couple of hundred points and performs fine in modern browsers and isn't too bad in IE7-8. This said however, even after messing with the Ext JS build system, the minimum Ext build required

ExtJS 4 “always on top” Window

六月ゝ 毕业季﹏ 提交于 2019-12-19 06:11:11
问题 I need to implement Window which can be always on top. How can I to do it? All my tries with WindowManager give me no results :( 回答1: In Ext.window.Window, there's a property called ' modal ': set it to true. Otherwise, use the WindowManager to manage your windows: in this case you have to follow the following steps: register your windows to the WindowManager ( Ext.WindowManager.register (winId) ) use bringToFront method to set your window on top ( Ext.WindowManager.bringToFront (winId) )

Loading hasMany data in ExtJS

我们两清 提交于 2019-12-19 05:49:22
问题 I'm trying to load 'nested' data in a hasMany relation in ExtJS4. My model looks like this: Ext.define("Entrypage.model.Entrypage",{ extend: "Ext.data.Model", fields: ['id','title','urlkey','text','picture','keywords', 'searchterms','description','critriamodus'], hasMany: {model: 'EntrypageCriterium',name:'brands'}, proxy: { type: 'ajax', url: '/Admin/extjson/entrypages', reader: {type:'json', root:'entrypages'} } }); And EntrypageCriterium : Ext.define("Entrypage.model.EntrypageCriterium",{

What are differences between Ext.create() and Ext.define() in SenCha Touch

…衆ロ難τιáo~ 提交于 2019-12-19 05:47:36
问题 I have been learning SenCha Touch for awhile and still feel confused when trying to create a store. In the SenCha Documentation, it says to use Ext.create() Example I tried and it simply doesn't work. For the rest of others, I always see people use Ext.define() to create a store and it works. Now, my question is: what are the differences between them and when/how to use either one of them in a right way? Some demo code is highly appreciated Thanks a lot my friends. 回答1: define is for

Include an existing CSS file in custom extjs theme

[亡魂溺海] 提交于 2019-12-19 04:07:06
问题 I have an existing CSS file that I would like to include in my ExtJS production build. I am using a custom theme. I know I can go to MyApp/packages/myCustomTheme/sass/etc/ and use an @import in the all.scss file. But that uses the @import in the production file. I'm hoping there is a way that I can get my existing CSS file compressed with the rest of my app's CSS. 回答1: To include your custom css file in your production build, you can include the stylesheet above the <!-- <x-compile> -->