English 中文(简体)
在从仓库中删除物品时如何发现过份性?
原标题:How to detect dirtyness when removing item from a store?

我拥有从服务器中回收的物品。 我愿发现一些变化,以相应地改变统一分类制度。

我能够发现 d脏记录(新、更新),但我不知道如何发现删除,我也需要处理。

An illustration of my problem: http://jsfiddle.net/MikeAski/bBUB2/

任何想法?

最佳回答
问题回答

你们需要做两件事:

  1. Keep track of what posts were originally there so you can mark it as dirty if one is deleted.
  2. Keep track of new posts, and if they are deleted then mark that part as clean.

Because of your call to each post s isDirty function, you are only checking if the current posts have been updated or created. You basically need a snapshot of what posts exist when it is clean, and then you can compare if any of those have been deleted.

你们也可以保存新增加的员额记录。 这样,删除一个字句时,你就可以核对是否添加(添加一个<>条码>:新的旗帜或类似的国旗)。 删除后,如果可以检查<条码>---------------------/代码>,并用其他方式加以标明,即可将其删除。

为了做这些事情,你将需要一项职能,即检查作为第一次ir脏检查的删除情况,然后检查你目前那样的员额。





相关问题
Are Recursive Collections possible in sproutcore2?

I have a customizable navigation tree that can be nested 3 levels deep. Templates: <script type="text/x-handlebars" data-template-name="NavItemView"> <a {{bindAttr href="href" class="...

ember.js widgets

I know that ember js is good for single page apps and it appears that you can localize ember js app to a single dom container rather than the whole page, so I m wondering if ember js would be a good ...

Ember.js binding models stored within an array

What is the correct way to bind from one model to another when the models are stored within an array? Typically I d imagine that this would be a Controller s content array, but to keep the example ...

rendering views dynamically on EmberJS

I just having a little trouble to implement a special kind of view for Ember, I m digging on the source for days but can t find how to make it work... Can you take a look and tell me what s wrong? It ...

热门标签