弹性+凯恩格姆 +绑定 VO 上的 getter setter
我觉得这应该是一件简单的事情,但我在经过一番挫折后才提出这个问题。
好的,我正在 Flex 3 的 Cairngorm 中做一个项目。在其中一个组件中,我有一个绑定到模型定位器中 VO 的图块列表。一旦 VO 包含一些数据,我想运行一个函数,这些数据基本上将 VO 中的某个值相加。我在安娜堡的 Flex Jam 上,我认为詹姆斯用吸气剂和吸气剂做了这件事。二传手以凯恩戈姆为例。
这是一件简单的事情吗?有人有如何执行此操作的示例吗?有更简单的方法吗?
提前感谢您的任何帮助/建议。
I feel like this should be a simple thing, but here I am asking the question after a good amount of frustration.
Ok I have a project I'm doing in Cairngorm in Flex 3. In one of the components I have a tile list that's bound to a VO in a Model Locator. I want to run a function once that VO contains some data that basically adds sums a certain value in that VO. I was at the Flex Jam in Ann Arbor and I thought James did this with getters & setters with his Cairngorm example.
Is this a simple thing? Does anyone have an example of how to do this? Is there an easier way?
Thanks ahead of time for any help/advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来他所做的是在 VO 中为集合属性添加一个 getter/setter,它根据新集合的内容重新计算总和值,即这是一个非常标准的方法,下面的代码并不困难。
It sounds like what he did was add a getter/setter for the collection property in the VO which recalculates that summed value based on the contents of the new collection, i.e. This is a pretty standard approach and the code below is not difficult.