问题标签 [extjs4.2]
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.
javascript - 使用 BoundList 作为小部件
我有一个扩展的绑定列表,我将它用作小部件。获取/设置值和其他效果很好,但是:如何在它之前添加字段标签?设定值示例:
你能帮助我吗?还是我必须将此边界列表放在面板中的唯一解决方案?
extjs - ExtJs 4 如何解决重复的 id 多个选项卡问题以保存状态
我有一个在多个选项卡上实例化的网格面板。网格面板的每个实例都有相同的列,但数据不同。我正在尝试使用状态管理器来保存列设置,例如列顺序和宽度。
问题是 ExtJs 将列的(生成的)id 保存在数据库中的第一个选项卡中,下一个选项卡为列生成新的 id,并且无法在数据库中找到这些新值的状态信息。所以我无法保存和加载有状态信息。
编辑:我尝试使用 itemIds 而不是 ids,因为 itemIds 包含在容器中,因此如果在多个选项卡上它不会是重复的 id。但是无论 itemId 属性如何,如果不存在 id,Ext 似乎都会生成 id。我添加了这一部分,以防它更好地了解我正在尝试完成的工作:数据库需要所有表具有相同的 id,但 Ext 需要它们不同。
php - 如何在树子点击事件上处理 php 文件?
我在 中创建了一个tree panel
,并在 的北部地区Viewport
放置了toolbar
一些。menu items
Viewport
这是它的工作原理:
- 我选择 File -> Open,然后我得到一个即 XML 文件
- 现在这
"somefile.xml"
将被动态添加到树中
我想在 treeChileNodeClick 上执行以下操作:
- 一旦我
dblclick
打开somefile.xml
,我希望能够调用一个php
对 xml 文件执行某些操作并返回结果的文件 - 如何运行该
php
脚本? - 如何检索该
php
脚本的返回值?
感谢您提供任何提示/解决方案。
javascript - Rendering ExtJS 4+ MVC application in a html div - how-to?
All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the "viewport", which in other words means full browser screen, and occupying whole HTML BODY.
I would like to render application within the existing HTML page within named DIV, so that I can have HTML design around the application.
I've seen some sites with ExtJS 4 examples that use trick to render ExtJS app within the page by using IFRAME.
Is it possible to avoid IFRAME? And, if it is, how skeleton of ExtJS 4.2 application shall look like if it will be rendered within a div.
Notes: In ExtJS 3 I have found the solution by creating a panel as main container which renders within named div. However, version 4.2 (and possibly earlier 4.x's) suggests MVC application approach that seem far superior.
---- Edits
I have realised that I have to put starting points for this question.
- Source for this example is generated by ExtJS's CMD command that generates "application" framework skeleton.
- Skeleton of application is consisted of many files including engine reference, and other references, so I would not be able to include here all sources in "application" dir/folder. Skeleton of application can be done using cmd in the fashion:
sencha -sdk /myuserroot/Sencha/Cmd/3.1.1.274 generate app ExtGenApp /mywebroot/htdocs/extja_genapp
This generates files and folders and copies all necessary files in the place. - "User" activity area is in "app" dir. App dir has subdirs for views, controllers, models and additional stuff.
- As in many other frameworks you are expected to keep folder structure so that framework can find appropriate files and initialise them.
- list of files:
index.html (in the root of the generated application)
app/app.js
note: originally there is no launch function but there is auto generate viewport (one gets that by default generator)
app/controller/Main.js
app/view/appBoxView.js
this shall be initial layout on the screen (AFAIK)
and finally:
app/view/Main.js
which shall, as I understood, be the "content".
as is, it generates an error of not founding "Ext.view.appBoxView" and how it looks to me, framework do not initialise the application.
javascript - 如何在 ExtJs 中下钻图表
这是我的示例应用程序,其中我有一个条形图、一个雷达和四个饼图。我必须深入分析条形图。我之前开发了一个应用程序,但我没有使用 MVC,并且我能够深入分析条形图.但是现在我使用的是EXTJS MVC,我不明白我应该在哪里放置下钻代码..这是我以前没有MVC的barChart ..
这是我没有 MVC 的 barChart 现在我已经创建了具有 MVC 结构的应用程序。这是我的控制器文件....
这是我的查看文件...
这是我的商店..
javascript - 两个语句执行之间需要延迟
我正在使用 extjs 4.2,并且在一个地方我正在加载这样的存储对象:
在下一行我想像这样从存储对象中获取第一个值的referenceId
我得到了错误,因为到目前为止,商店对象 userDetailStore 的 getCount() 给了我零。但是如果我写一个警报语句,如alert('loading data'); 在我获得 referenceId 的行之前,代码工作正常。行userDetailStore.getCount()给了我确切的值。
所以我认为在加载商店和使用商店之间需要某种延迟,但我不想显示警报。我什至使用sleep()方法代替警报语句。但这也不是工作。(顺便说一句,我什至不想通过执行sleep()来冻结浏览器)
加载商店时我做错了什么吗?有什么通用方法可以在商店完全加载后执行我的代码以使用商店?
有人请在这里帮我...
问候:开发
extjs - Calculate the grid column value with total value in extjs4.1
I have the grid with two columns: Target and Target Percentage. I am getting Target value from store. I need to calculate Total and Target percentage value using Jan/Total Jan*100. I want a summary for target %. Can anybody tell me how to do this?
I need to calculate the total manually
E.g
Thanks
javascript - 多选和取消选择绑定列表
我必须为表单创建一个自定义绑定列表,当它具有单选并且不取消选择时它可以正常工作。如何告诉绑定列表进行取消选择和多选?
不工作:
不起作用(这是在扩展的 FieldContainer 中):
extjs - 如何从商店回调中获取响应码?
我正在尝试在服务器端处理会话超时。当会话超时时,我的服务器用 json 发回响应
{success: false}, ContentType: 'application/json', ResponseNo: 408
店铺:
在客户端,我像这样处理回调加载存储:
要执行不同的响应,我想更改警报。所以,如果没有回应。是408
,我可以提醒session expired
(等等,管理响应号码)。
但我没有找到任何方法得到回应。店内回调!
有什么建议么?
php - 如何从 php 返回的 json 对象创建 js 数组?
Javascript 有这行代码,可以提醒您正在使用什么类型的对象。如下:
所以,我正在使用php
and js - extjs 4.2
,并寻找一种方法将associative array
php 创建的传递给 java 通过使用json_encode()
. 所以我做了以下事情:
parse.php
从 js 代码中可以看到,代码的 php 部分在文件中。当我提醒 obj 时,它会显示一串 json 编码的 php 数组。并且 js 说obj是一个string object
. 如果我在没有 responseText的情况下保留注释行,js 会发出警报,obj is an Object
但不会说什么类型(猜测 json 类型)。
我想要实现的是拥有一个合法的 js 数组,该数组将从响应中获取该 php 数组(响应是函数中的参数)。谢谢
编辑:我的 php 数组结构