天道酬勤,学无止境

extjs

extjs 6.01 的跨域问题(cross origin problems with extjs 6.01)

问题 我正在使用 POST 表单登录我的后端,它可以正常工作。 后端接受所有位置 (*) 登录后,我准备获取一些数据,然后跨域请求被阻止:同源策略不允许后端.test/Statistics/.stat(原因:CORS-header 'Access-Control- Allow-Origin' 不对应于 '*')。 onLoginClick: function(buttons){ // this.onLoginSuccess(null,null); // return; var me = this; var loginForm = this.lookupReference('loginForm'); loginForm.submit({ url: this.url, scope: this, success: me.onLoginSuccess, failure: me.onLoginFailure, waitMsg: 'Validating...' }); }, onLoginSuccess: function (form, action) { var me = this; // destroy login window (form) me.getView().destroy(); var check = Ext.Ajax.request({ url : 'http:/

2021-06-24 10:15:15    分类:技术分享    ajax   extjs   cors

Dynamic Proxy URL for store.load() in MVC architecture with Ext JS

I want to change the proxy of a store before (!) it is loaded. The specific problem in this case is that I do not find the right moment, when to load. In detail: I have created a MVC-model by creating a view, a controller, a model, and a store as defined by EXTJS4 architecture. The view is a grid panel. It defines the store within its own define statement: Ext.define('P.view.MyView' ,{ extend: 'Ext.grid.Panel', alias : 'widget.MyView', ... store: 'MyStore', ... } When I load the store with "autoload:true" everything works fine, but of course the proxy is then static as defined in the code

2021-06-24 07:56:54    分类:问答    extjs   proxy   extjs4

Catch change in content of HtmlEditor in ExtJS 4

I want to capture whenever the user changes the content of an HtmlEditor in ExtJS 4. I have tried the sync, change, and push events all with no success. Sync seems to be fired whenever focus is gained, change isn't fired, and I can't tell what causes push to be fired. Can anyone tell which event is fired when the user changes the content of an HtmlEditor? Thanks Edit: I have tried the following code which does not work for me, any ideas? init: function() { this.control({ 'htmleditor[name="reportHtmlEditor"]': { render: this.addKeyHandler } }); }, addKeyHandler: function(field) { // This gets

2021-06-24 07:51:56    分类:问答    extjs   html-editor

Phonegap + Sencha + Android : ajax request with a basic access authentication failled

I folks, I'm working on a Phonegap application and the Sencha framework. I try to reach a protected server but the authentication failed with Android (but not with iOS). I use the code below : Ext.Ajax.request({ url:"http://user:password@api.website.fr/query.json", method: 'GET', // I tried to send the header directly but it didn't work too headers: { "Authorization": "Basic s2dh3qs76jd2hqjsdh==" }, success: function (result, request) { alert(result); }, failure: function ( result, request) { for(var key in result) alert(result[key]); } }); The error message says me that an HTTP digest is

2021-06-24 07:48:30    分类:问答    javascript   http   authentication   cordova   extjs

Extjs 4 grid filtering

this is exactly what I am looking for http://www.developerextensions.com/index.php/extjs-filter-row but I could not find a version which would work well with extjs 4 Its very possible that I created a false code because I am noobie in extjs so could you please help me with this or some similar extension how exactly to implement it and make it work? Thank you very much in advance.

2021-06-24 03:09:53    分类:问答    plugins   extjs   filter   grid

Sencha Touch: Clicking a button rapidly will push a view twice

Say I have a button that triggers a push of a new view. I noticed that if I click it more than once, fast enough, it will push the same view twice. You can mimic this behavior using their official docs on this page, where they have a live sample: http://docs.sencha.com/touch/2-0/#!/guide/navigation_view the clear question is, simply how to prevent it?

2021-06-24 00:44:13    分类:问答    extjs   sencha-touch   sencha-touch-2

How to add more than 3 SERIES in a LINE or SCATTER chart?

When I try to add more than 3 SERIES in a LINE or SCATTER chart, an exception occurs: In Google Chrome: Uncaught TypeError: Property 'undefined' of object [object Object] is not a function In Firefox: Ext.chart.Shape[type] is not a function [Stop this error] }, attr)); This was identified by ExtJS Support as a bug: http://www.sencha.com/forum/showthread.php?140932-How-to-add-more-than-3-SERIES-in-a-LINE-or-SCATTER-chart Below follow the code: Ext.require('Ext.chart.*'); Ext.define('AM.view.user.ScatterGraphic', { extend : 'Ext.chart.Chart', alias : 'widget.scatterGraphic', title : 'All Users'

2021-06-23 21:40:56    分类:问答    extjs   charts   extjs4

与 Ext 一起使用的表示模式(Presentation patterns to use with Ext)

问题 您认为 Ext 喜欢或成功使用了哪些表示模式来实现高可测试性和可维护性? 由于 Ext 组件实例通常与状态和某种表示逻辑(例如文本字段的格式验证)紧密耦合,被动视图不是一个自然的选择。 监督演示者似乎可以工作(我曾在一个场合轻松使用它)。 Presentation Model的适用性如何? 还有其他人吗? 虽然这个问题是专门针对 Ext 的,但它也适用于类似的框架,如SmartClient ,甚至 RIA 技术,如 Flex。 因此,如果您对任何其他 Web UI 技术有任何第一手模式经验,您的意见仍然会受到赞赏。 回答1 在考虑演示模式时,这是一个很好的引用: 将用户界面代码与其他所有内容分开是精心设计的软件中的一个关键原则。 但它并不总是容易遵循,它会导致应用程序中的更多抽象难以理解。 相当多的设计模式都试图针对这种场景:MVC、MVP、监督控制器、被动视图、PresentationModel、Model-View-ViewModel等。 出现这种模式的原因是这个问题域太大而无法解决一种通用解决方案。 但是,每个 UI 框架都有自己独特的特征,因此它们与某些模式的配合比其他模式更好。 就 Ext 而言,我认为最接近的模式是模型-视图-视图模型,但是这种模式在保持关键原则(状态、视图、模型)的分离的同时很难编码。 也就是说,根据上面的引述,每个模式都试图解决/划分

2021-06-23 18:03:47    分类:技术分享    language-agnostic   extjs

Gradle — 从任务中执行多个命令(Gradle — execute multiple commands from task)

问题 我有 2 个单独的应用程序(在一个项目中)需要 2 个单独的构建(sencha cmd)。 我被要求创建一个 gradle 脚本来为这两个应用程序进行构建。 我创建了一个构建一个应用程序的任务,但是在使用相同的任务构建第二个应用程序时遇到了麻烦。 这是我到目前为止: task senchaCmdBuild (type: Exec) { workingDir 'src/main/app/MYAPP' commandLine 'cmd', 'c', 'sencha app build' } 这很好用。 当我将以下 2 行添加到上述任务时: workingDir 'src/main/app/MYOTHERAPP' commandLine 'cmd', 'c', 'sencha app build' 第一个命令被忽略,只执行第二个命令。 那么无论如何我可以通过一项任务执行两个命令吗? 回答1 您可以使用第二种方式在 gradle 上声明任务类型。 task senchaCmdBuild { doLast { exec { workingDir 'src/main/app/MYAPP' commandLine 'cmd', 'c', 'sencha app build' } exec { workingDir 'src/main/app/MYOTHERAPP' commandLine

2021-06-23 17:43:26    分类:技术分享    extjs   gradle

AEM 6.1 使用的 Ext JS 版本(Version of Ext JS used by AEM 6.1)

问题 AEM 6.1 使用哪个版本的 Ext JS 库? 有没有直接的方法/控制台可以找到这个? 回答1 它使用 ExtJS 的v3.4.0 ,在此基础上构建了 AEM 小部件库。 您可以在/libs/cq/ui/widgets/source/ext/release-notes.html找到详细信息 以下注释也可在 https://docs.adobe.com/docs/en/aem/6-1/develop/components/widgets.html 上找到 Adobe Experience Manager 基于 ExtJS 3.4.0 构建。

2021-06-23 17:40:11    分类:技术分享    extjs   adobe   aem