extjs

Sencha: Cannot satisfy requirements for “ext”

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 09:36:06
问题 trying to refresh my sencha extjs app and always get this error: Commands: sencha app refresh sencha app upgrade Always the same error: [ERR] Cannot satisfy requirements for "ext"! [ERR] The following versions cannot be satisfied: [ERR] root: ext@5.1.1.451 (No matches!) [ERR] Cannot resolve package requirements What can I do? Sencha Cmd: v6.1.3.42 (with last version 6.2.0 I get this error too) Core Version 5.0.0 Extjs Version 5.1.1.451 Thanks in advance 回答1: This error is occurring because

Using regular expression in Ext Js VType

江枫思渺然 提交于 2019-12-24 09:31:23
问题 I have a regular expression for checking numbers and allowing "-" (Hyphen) Text Field. var regex = /^\d+-\d{1,2}$/; //Checks "digits-digit(s,1 or 2)" This works ok for regular HTML text field. But if I want a Ext Js TextField I have to do the below code Ext js TextField and called a VType var <portlet:namespace/>issueNoField = new Ext.form.TextField({ fieldLabel: 'Issue No', width: 120, valueField:'IssNo', vtype: 'hyphen' }); Ext.apply(Ext.form.VTypes, { hyphenText : "Only numbers and hyphen.

Reset does not work a form in Sencha Touch

对着背影说爱祢 提交于 2019-12-24 09:27:42
问题 All I want to do is when I click the reset button on my form it resets all fields. And I have tried everything but it does not seem to work. Here is the class that has the button in it: App.views.HomeIndex = Ext.extend(Ext.form.FormPanel,{ floating: true, scroll: 'vertical', itemId: 'jobSearch', centered: true, modal: true, hideOnMaskTap: false, items: [{ xtype: 'textfield', itemId: 'keywords', label: 'Keywords', labelAlign: 'top', labelWidth: '100%', name: 'keywords' },{ xtype: 'textfield',

Parsing simple JSON using Ext gives SyntaxError: Unexpected token ILLEGAL

前提是你 提交于 2019-12-24 09:03:49
问题 i'm doing a simple parse of some JSON and it's giving me an error in chrome, what am i missing here? Ext.util.JSON.decode("{info: {synopsis: 'test'}}"); SyntaxError: Unexpected token ILLEGAL Thanks a lot 回答1: http://www.json.org/ Think you should use double quotes instead of single quotes. Ext.util.JSON.decode('{"info": {"synopsis": "test"}}'); 回答2: Be careful if you are using ExtJs 4 onward, You have to use Ext.JSON.decode('{"info": {"synopsis": "test"}}'); 来源: https://stackoverflow.com

Setting time out in iframe inside Ext.Window

大兔子大兔子 提交于 2019-12-24 08:55:47
问题 I have an iframe inside ExtJS Ext.Window component. In the iframe , I make an ajax call to the php layer, which returns a pdf object and that gets rendered in the iframe . I need to set timeout in the js layer, say if the processing takes more than 1 second, I should abort the process. I saw about the various methods that iframe provides, but there is nothing relating to timeout. ontimeout is the closest function, but I am not clear where to set the timeout. var win = new Ext.Window({ id:

How to change title backgroundColor by using lookupReference in extjs

一世执手 提交于 2019-12-24 08:38:13
问题 I m using lookuprefernce to get values. I want to change background color. var LRMainPanelRef = this.lookupReference('MainPanelRef'); var titletext = LRMainPanelRef.items.items[1].title; I want to set back color and want to use something like this dont know how to do it ..I am trying this LRFMainPanelRef.items.items[i].title.backgroundColor= "#FFEFBB"; 回答1: You can change background color of title using getHeader(). Eg: var mypanel = this.lookupReference('mypanel');//mypanel is reference of

Datecolumn: Unable to cast object of type 'System.DateTime' to type 'System.String'

非 Y 不嫁゛ 提交于 2019-12-24 08:26:02
问题 I have a sql table with a column [WelcomeSent] with type: Datetime and null values existing in this column I have this code to get the values from my DB and store them in a grid: var result = (from i in dc.vw_Users where i.id == id select i).ToList(); //error line storeUsers.DataSource = result; storeUsers.DataBind(); In my grid there is a column: <ext:DateColumn runat="server" ID="ColUsersWelcomeSent" DataIndex="WelcomeSent" Text="WelcomeSent" Width="80" Format="dd/MM/yyyy" Hidden="true"><

can't set correct content-Type in Ext.Ajax.request

筅森魡賤 提交于 2019-12-24 08:19:37
问题 Code is as below: Ext.Ajax.request({ url: url, method: 'POST', headers: { 'Content-Type': 'application/json' }, jsonData: { textMatchStyle:"substring", fields: ["packageName","name","tableName"], data: {_domain:null,_domainContext:{},operator:"and",criteria:[]}, limit: 40, offset: 0 }, success: function(response) { console.log('Success'); },// function called on success failure: function(result) {Ext.MessageBox.alert('Error', 'Some problem occurred');}, }); This should work according to Extjs

Appending data to GridPanel in ExtJS

家住魔仙堡 提交于 2019-12-24 07:57:37
问题 I'm stuck with a seemingly simple problem: appending data to my ExtJS Gridpanel. I have a gridpanel with some initial data set up. var myData = [['data1','data2']]; var myReader = new Ext.data.ArrayReader({}, [ {name: 'Col1'}, {name: 'Col2'}, ); var datastore = new Ext.data.Store({ data: myData, reader: myReader }); grid = new Ext.grid.GridPanel({ store: datastore, ... etc This is all working fine.Now i would like to periodically append new data to this gridpanel (there is a function that is

How can I make Development builds behave the same as Testing and Production?

為{幸葍}努か 提交于 2019-12-24 07:44:50
问题 When developing an app I have sencha app watch running. This, of course, watches for file changes and triggers a development build. So now I can exercise the app under development in the browser. Nice. The problem is a sencha app build testing does not behave the same way as the Development build. The difference is in needing requires . If a requires is missing in Development, the app functions as if it was there. Chrome throws a warning - sometimes: [W] [Ext.Loader] Synchronously loading