- 浏览: 1130531 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (411)
- Java Foundation (41)
- AI/机器学习/数据挖掘/模式识别/自然语言处理/信息检索 (2)
- 云计算/NoSQL/数据分析 (11)
- Linux (13)
- Open Source (12)
- J2EE (52)
- Data Structures (4)
- other (10)
- Dev Error (41)
- Ajax/JS/JSP/HTML5 (47)
- Oracle (68)
- FLEX (19)
- Tools (19)
- 设计模式 (4)
- Database (12)
- SQL Server (9)
- 例子程序 (4)
- mysql (2)
- Web Services (4)
- 面试 (8)
- 嵌入式/移动开发 (18)
- 软件工程/UML (15)
- C/C++ (7)
- 架构Architecture/分布式Distributed (1)
最新评论
-
a535114641:
LZ你好, 用了这个方法后子页面里的JS方法就全不能用了呀
页面局部刷新的两种方式:form+iframe 和 ajax -
di1984HIT:
学习了,真不错,做个记号啊
Machine Learning -
赵师傅临死前:
我一台老机器,myeclipse9 + FB3.5 可以正常使 ...
myeclipse 10 安装 flash builder 4.6 -
Wu_Jiang:
触发时间在将来的某个时间 但是第一次触发的时间超出了失效时间, ...
Based on configured schedule, the given trigger will never fire. -
cylove007:
找了好久,顶你
Editable Select 可编辑select
Flex Nested Object & Nested Data Grid:
http://natescodevault.com/2008/10/11/nested-data-grid/
在使用flex时,如果一个vo的属性是另一个vo,在datagrid中做数据展现时,可以使用 vo1.vo2.somepro去展现数据;但在做基于该内联字段的排序时,会出现问题。该问题通过重写DataGridColumn的deriveComplexColumnData和complexColumnSortCompare方法,修改flex的代码,可以得到解决。但后来发现,尽管使用该方法后,可以做基于内联对象属性的排序了,但在对datagrid的dataProvider(一个arrayCollection)做getItemIndex(也包括removeItemAt/addItemAt等,内部是调用了getItemIndex的)时,会出现另一个bug:
查找条件必须至少包含一个排序域值
Find criteria must contain at least one sort field value
http://stackoverflow.com/questions/5895483/flex-find-criteria-must-contain-at-least-one-sort-field-value
http://bugs.adobe.com/jira/browse/SDK-23643?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
https://bugs.adobe.com/jira/browse/SDK-9801
报错的代码在Sort.as的findItem方法中:
修改FLEX源代码,还怕改出其他问题来,不是上上之选。目前已知的可采用的变通方法有两个:
一 仍然使用nested object,新建一个arrayCollection2,和作为datagrid的dataProvider的arrayCollection使用相同的source;对arrayCollection的增删改,全部通过操作arrayCollection2来完成,并refresh arrayCollection。目前采用的就是这种方法,可以规避“Find criteria must contain at least one sort field value”这个bug的出现。
二 采用变通的方式来展现nested object(此种方式未验证正确性,不过应该可行):
DataGrid error - Find criteria must contain at least one sort field value
http://www.flexonjava.net/2010/09/datagrid-error-find-criteria-must.html
http://natescodevault.com/2008/10/11/nested-data-grid/
在使用flex时,如果一个vo的属性是另一个vo,在datagrid中做数据展现时,可以使用 vo1.vo2.somepro去展现数据;但在做基于该内联字段的排序时,会出现问题。该问题通过重写DataGridColumn的deriveComplexColumnData和complexColumnSortCompare方法,修改flex的代码,可以得到解决。但后来发现,尽管使用该方法后,可以做基于内联对象属性的排序了,但在对datagrid的dataProvider(一个arrayCollection)做getItemIndex(也包括removeItemAt/addItemAt等,内部是调用了getItemIndex的)时,会出现另一个bug:
查找条件必须至少包含一个排序域值
Find criteria must contain at least one sort field value
Error: 查找条件必须至少包含一个排序域值。 at mx.collections::Sort/findItem()[E:\dev\4.x\frameworks\projects\framework\src\mx\collections\Sort.as:541] at mx.collections::ListCollectionView/getItemIndex()[E:\dev\4.x\frameworks\projects\framework\src\mx\collections\ListCollectionView.as:652] at com.bcia.fids.ops.depf::FidsDepf/delFidsDepfInGridResult()[D:\FIDS\flexsrc\FidsFlex\src\com\bcia\fids\ops\depf\FidsDepf.mxml:233] at com.bcia.fids.ops.depf::FidsDepf/messageHandler()[D:\FIDS\flexsrc\FidsFlex\src\com\bcia\fids\ops\depf\FidsDepf.mxml:187] at com.bcia.fids.ops.depf::FidsDepf/flexMessageResultHandler()[D:\FIDS\flexsrc\FidsFlex\src\com\bcia\fids\ops\depf\FidsDepf.mxml:316] at com.bcia.fids.ops.depf::FidsDepf/___FidsDepf_Operation17_result()[D:\FIDS\flexsrc\FidsFlex\src\com\bcia\fids\ops\depf\FidsDepf.mxml:50] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\AbstractOperation.as:249] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:318] at mx.rpc::Responder/result()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:56] at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:84] at NetConnectionMessageResponder/resultHandler()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\channels\NetConnectionChannel.as:547] at mx.messaging::MessageResponder/result()[E:\dev\4.x\frameworks\projects\rpc\src\mx\messaging\MessageResponder.as:235]如在datagrid中使用nested object无法排序一样,这也是flex的一个bug:
http://stackoverflow.com/questions/5895483/flex-find-criteria-must-contain-at-least-one-sort-field-value
http://bugs.adobe.com/jira/browse/SDK-23643?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel
https://bugs.adobe.com/jira/browse/SDK-9801
报错的代码在Sort.as的findItem方法中:
public function findItem(items:Array, values:Object, mode:String, returnInsertionIndex:Boolean = false, compareFunction:Function = null):int { ... if (fieldsForCompare.length == 0) { message = resourceManager.getString( "collections", "findRestriction"); throw new SortError(message); } ... }
修改FLEX源代码,还怕改出其他问题来,不是上上之选。目前已知的可采用的变通方法有两个:
一 仍然使用nested object,新建一个arrayCollection2,和作为datagrid的dataProvider的arrayCollection使用相同的source;对arrayCollection的增删改,全部通过操作arrayCollection2来完成,并refresh arrayCollection。目前采用的就是这种方法,可以规避“Find criteria must contain at least one sort field value”这个bug的出现。
二 采用变通的方式来展现nested object(此种方式未验证正确性,不过应该可行):
DataGrid error - Find criteria must contain at least one sort field value
http://www.flexonjava.net/2010/09/datagrid-error-find-criteria-must.html
引用
I got the above error message while doing some random tests on my current Flex application. This always seemed to be happening under the following scenario... a DataGrid was on the screen, the grid was binded to a collection (myVosArrayCollection). One of the gird columns data fields was pointing to a nested value (myVO.field.child) :
<mx:DataGridColumn dataProvider="{myVosArrayCollection}" dataField="field.child".../>It seems like Flex has a problem dealing with nested objects for dataGrid column dataField. My solution is adding a wrapper getter on myVO.field.child , for me this is only natural as I'm using a two level VOs hierarchy exactly for these sort of scenarios, the BaseVO and the VO it self (but that's something I'll cover on a different post). MyVo now have a new getter:
public class MyVO { private var field:Object; public function get fieldChild():Object { return field.child; } }my DataGrid now has the following setup:
<mx:DataGridColumn dataProvider="{myVosArrayCollection}" dataField="fieldChild".../>
发表评论
-
myeclipse 10 安装 flash builder 4.6
2011-12-11 12:47 15377从Flash Builder 4 之后,ado ... -
FLEX 服务器端交互: remoteObject & AsyncToken & 数据定时刷新 & Timer
2011-06-21 18:47 2743动态调用RemoteObject: Dynamically i ... -
FLEX : Tree & contextMenu & Array's filter & ArrayCollection's filterFunction
2011-05-29 16:05 1895Using Flex 4.5 / Using data-dri ... -
FLEX : ObjectProxy & <fx:Model> tag
2011-05-28 21:37 1975今天碰到了一个非常让我困扰的问题,使我觉得很有必要对Objec ... -
Flex:Application&Variable Scope(this owner parent parentApp parentDoc outerDoc)
2011-05-28 17:18 1385关键字: this owner parent parentA ... -
Flex : Performance tuning 性能调优
2011-05-28 14:50 1669附件: Flex Application Performanc ... -
FLEX example 例子
2011-05-28 12:12 3173How to find an ArrayCollection ... -
FLEX : Validator 验证
2011-05-26 23:57 2173Data Access and Interconnectivi ... -
FLEX : Event 事件
2011-05-24 19:51 1682ActionScript 3.0 Developer’s Gu ... -
FLEX:Data Binding 数据绑定
2011-05-24 14:44 3596务须精读的文章: Flex data binding pitf ... -
FLEX Component 组件 汇总
2011-05-23 13:56 2270Combox默认将对象中名为label的属性作为显示用的lab ... -
FLEX : dragEnabled & dropEnabled
2011-05-22 17:38 1679通过设置dragEnabled属性为true,可以使这些控件作 ... -
FLEX Data type 数据类型
2011-05-22 09:21 2046Programming ActionScript 3.0 / ... -
FLEX ERROR WARNING 总结
2011-05-22 08:13 3186常会碰到的错误:TypeError: Error #1009: ... -
Flex: labelFunction versus ItemRenderer
2011-05-22 07:16 3249When to Use labelFunction versu ... -
Flex Application 初始化顺序
2011-05-22 06:15 1620http://blog.csdn.net/chengyong ... -
Flex Metadata 元数据:Bindable(注意首字母大写),etc
2011-05-22 06:08 1748Adobe® Flex™ 3.2 语言参考 -> 元数据 ... -
FLEX笔记
2009-04-15 10:29 2309Adobe Flex 4 官方资料库: http://help ...
相关推荐
javax.activation.UnsupportedDataTypeException: no object DCH for MIME type multipart/mixed; boundary="----=_Part_0_1760344884.1407394057461" 第一步:需要先grantq权限: EXEC dbms_java.grant_...
NEVE:基于ARM架构的嵌套虚拟化扩展 随着ARM服务器在云基础设施部署中的不断深入,在ARM上支持嵌套虚拟化是近年来随着ARM体系结构引入嵌套虚拟化支持而出现的一个关键因素。
克隆此仓库git clone https://github.com/mucahit/nested-table.git 运行yarn或npm install来安装依赖项。 运行yarn start或npm start来查看演示。 测验 运行yarn test或npm test进行测试。 生产 运行yarn build或...
注意: nested-object-mask可以与普通 JS 一起愉快地工作,但它是用 coffeescript 编写的,下面的例子也是如此(因为它是 2015 年)。 基本的 最简单的nested-object-mask是这样做的: # the hero of our story ...
论坛源码 用一句话来概括我的框架所提供的功能: 提供一套简单但实用的数据处理接口(个人觉得用起来非常自然,比LINQ和EF都要简单), 这套接口可以满足上层应用的任何数据处理请求 下面简要介绍一下这个框架...
安装将此行添加到您的应用程序的Gemfile中: gem 'nested_record' 然后执行: $ bundle或将其自己安装为: $ gem install nested_record用法使用nested_record通过JSON属性在ActiveRecord模型上定义嵌套的关联。...
JSS插件,支持嵌套选择器 在规则中的选择器前放置& ,... '&:hover' : { background : 'blue' } , '&.clear' : { clear : 'both' } , '& .button' : { background : 'red' } , '&.selected, &.active' : { b
python库。 资源全名:nested-dictionaries-0.0.1.tar.gz
java解决Handler processing failed; nested exception is java.lang.NoClassDefFoundError
资源来自pypi官网。 资源全名:Nested-List-1.0.4.tar.gz
data Nested fs a where Flat :: f a -> Nested ( Flat f ) a Nest :: Nested fs ( f a ) -> Nested ( Nest fs f ) a 甲Nested fs a是中提到的所有层的组合物fs ,施加到a 。 具体来说, fs参数是一种 snoc-list ...
java解决nested exception is java.lang.OutOfMemoryError Java heap space 解决OOM
嵌套观察Object.observe()用于嵌套对象。兼容性nested-observe内部使用WeakMap (用于垃圾收集)。 Node.js的支持WeakMap和Object.observe从版本0.11.13 。 对于浏览器,请查看: 。 对于不受支持的浏览器 ,您可以...
资源来自pypi官网。 资源全名:nested_models-0.1.0-py2-none-any.whl
python库,解压后可用。 资源全名:nested_models-0.1.0-py2-none-any.whl
Hibernate4(关系映射-事务-原理-性能和二级缓存-最佳实践).Hibernate4(关系映射-事务-原理-性能和二级缓存-最佳实践).
2013-08-12 14:33:37.672:WARN::Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [file:/E:/cloudwave-core/src/main/...
linux编程技术详解配套光盘,含有书中实例源代码
hstore 文档 这个 gem 允许使用 Hstore... accepts_nested_attributes_for :address end class Address include Hstore :: Document field :street field :number , type : Fixnum field :zip , type : Fixnum f
1.8. Chapter 8: Nested fragments 1.9. Chapter 9: Action Bars 1.10. Chapter 10: Navigation Drawers 1.11. Chapter 11: SQLite databases 1.12. Chapter 12: Cursors and AsyncTasks 1.13. Chapter 13: Services...