问题标签 [extjs-mvc]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
8807 浏览

extjs - ExtJS4 hbox 布局问题

我们在我们的应用程序中使用 ExtJS4。但是我们遇到了 hbox 布局的问题。我们需要从右侧显示项目。通常在 ExtJS4 中,hbox 布局中的项目从左侧开始并向右移动。但是我们需要从右侧开始向左侧移动。我认为我们需要更改 ExtJS4 库中的顺序(框布局)。

ExtJS4 盒子布局是:

帮助将不胜感激。

0 投票
1 回答
2714 浏览

extjs - 如何使用 ExtJS 4 类模型在视口中获取选项卡面板?

我遇到了 extjs 4 类模型的问题。我想在视口中获得一个标签面板。我通过定义自己的元素并使用 xcode 自动加载它来运行它。但我没有在父类本身内完成它。

我的代码有什么问题?

0 投票
1 回答
3352 浏览

javascript - 更改高度或向 EXTjs ext.tab.Tab 组件添加填充

我有一个选项卡面板,里面有几个选项卡。我在选项卡中使用 iconCls 属性为每个选项卡提供一个图像及其标题。我正在使用fam fam fam 16x16 图标,默认选项卡空间是在顶部/底部剪切图像。

我尝试通过更改边距来弄乱图标的类,但这无济于事。根据文档, ext.tab.Tab 组件具有 padding 和 height 属性,但设置这些属性不会在运行时对选项卡产生影响。

也许我误解了这些属性是如何工作的,但页面上的所有内容看起来都一样。

编辑:当用作手风琴面板时,我似乎对“标题”(带有 +/- 的栏)有同样的问题。

0 投票
3 回答
2309 浏览

extjs - ExtJS 4 问题,尝试对深度嵌套的 JSON 数据进行更新

我的 Json 数据:-

我的商店定义:-

我的模型定义:-

显示上述商店的视图:-

当前情况:我可以显示来自 Json 对象的数据值。

问题:每当我在编辑字段后在控制器中调用 this.getAttrStore().sync() 时,都会出现错误。我搜索了许多论坛并意识到在更新深度嵌套的 JSON 数据时似乎存在一些问题。

我曾想过获得彼得穆勒的补丁,但我还没有真正尝试过。

如果我错了,或者如果你能指出一些有用的东西,请纠正我,这将是一个很大的帮助。

非常感谢!

0 投票
4 回答
14752 浏览

extjs - ExtJS MVC, dynamic loading and i18n

I would like to translate my ExtJS application in different languages. My issue is that I'm using ExtJS MVC framework, and most of my JS files are downloaded dynamically by the framework itself.

The ideal solution (that I thought of) would be to have an extra option in the Ext.Loader (or in my Ext.app.Application) that would define the language to use, and depending on this to automatically download such file as "a.MyClass.fr.js" after loading my "a.MyClass.js" (which would contain an Ext.apply, overriding my string resources). That's probably not available in the ExtJS framework at the moment.

The alternative solution I can see, is to perform a trick on the server-side. First, a cookie would be created on the client, to set to the language. On the server-side, I could catch all the requests to JS files, then if a cookie is set (='fr' for example), I'd combine the requested JS file (MyClass.js) with its i18n's friend (MyClass.fr.js) dynamically on the server and return the result. That would work, but it's really tricky because it implies other things (caching...).

Maybe the best way is to implement the first behavior I described in the ExtJS framework myself...

What do you think? I'm looking for a really clean and neat way of doing it! Thanks :)

0 投票
1 回答
1103 浏览

javascript - 使用 ExtJS MVC 构建 UI 的好教程/插件

我对客户端编码有点陌生,正在寻找一个好的插件/教程/演示/示例来使用 ExtJS-MVC 构建 UI。

请不要对其他框架(jQuery/ext 等)展开辩论。

谢谢。

0 投票
1 回答
1263 浏览

extjs - ExtJs 4 MVC 应用架构:如何引用子文件夹中的文件

我正在尝试在项目中使用此结构:

  • 应用 > 视图 > MyWindow1.js
  • 应用 > 视图 > MyWindow2.js
  • 应用 > 视图 > ui > MyWindow1.js
  • 应用程序 > 视图 > ui > MyWindow2.js

但是,如果我想插入一个子文件夹,例如:

  • 应用 > 视图 > window3 > MyWindow3.js

我不知道如何引用它。

在我的 app.js 中,我可以通过以下方式引用 MyWindow1 和 MyWindow2:

var win1 = Ext.create('MyApp.view.MyWindow1'); var win2 = Ext.create('MyApp.view.MyWindow2');

但是,我怎样才能引用 MyWindow3?

我试过

var win3 = Ext.create('MyApp.view.window3.MyWindow3');

,但没有成功。

0 投票
2 回答
1551 浏览

forms - 在 sencha touch extjs 中读取表单域

我有一个表单字段,我想阅读输入其中的文本,我尝试了以下代码:

0 投票
1 回答
4324 浏览

sencha-touch - Sencha Touch filter由商店提供

代码:

在我的模型中,我有四个字段:

姓名、年龄、性别、特征

我在这里尝试的是:

在页面上的列表中显示我的数据库的内容,因为列表很长,我想搜索,当用户在搜索字段中写入查询并按下搜索按钮时,将searchButtonTap 调用处理程序尝试过滤并显示列表与查询中的名称相似的名称我也尝试过filterBy,但这也不起作用。请让我知道有什么问题吗?

谢谢。

0 投票
1 回答
4003 浏览

extjs - Ext.tree.TreeLoader 不是构造函数错误

我是 Extjs4 的新手。在我使用 loader: new Ext.tree.TreeLoader() . 它显示像“Ext.tree.TreeLoader 不是构造函数”这样的错误。它在 extjs 旧版本中运行良好。请帮我。提前致谢