     if @collection.params
       @collection.params.page = options.page or 1
 
+    # states: loading <=> listing
+    #                 <=> error
+    count = @count()
+    @listMeta = new Backbone.Model({
+      state: "listing",
+      count: count,
+    });
+
+    # @listenTo @collection, "all", (event) =>
+    #   console.log(" => #{event}")
     @listenTo @collection, "add", (m) =>
       @added(m)
-    @listenTo @collection, 'reset', @addAll
+    @listenTo @collection, 'update', =>
+      @listMeta.set({state: "listing"})
+      @updateFilters()
+    @listenTo @collection, 'reset', =>
+      @listMeta.set({state: "listing"})
+      @updateFilters()
     @listenTo @collection, "sort", ->
       # @empty()
       # @addAll()
       @sort()
+    @listenTo @collection, "request", =>
+      @listMeta.set({state: "loading"})
+      @showAlerts()
+    @listenTo @collection, "error", =>
+      @listMeta.set({state: "error"})
+      @showAlerts()
+    @listenTo @collection, "sync", =>
+      @listMeta.set({state: "listing"})
+      @showAlerts()
+
+    # removed from the collection
     @listenTo @collection, "remove", @removed
-    @listenTo @collection, "request", @showLoading.bind(@, true)
-    @listenTo @collection, "error", @showError
-    @listenTo @collection, "sync", @showLoading.bind(@, false)
+
+    # destroyed
+    @listenTo @collection, "destroy", @removed
 
     @listenTo @, "render:post", =>
+      @prevState = @listMeta.get("state")
+      @listMeta.set({state: "loading"})
       @addAll()
+      @listMeta.set({state: @prevState})
+      @showAlerts()
 
     @listenTo @, "close", (e) =>
       for id, view of @views


  added: (model, container) ->
    if @filterFunc model, @filters
      skipShowEmpty = container == undefined
      if not container
        container = @getListElement().get(0)
      view = @getItemView model

          container.insertBefore(rendered, el)
        else
          container.appendChild(rendered)
      @cachedCount += 1
      return view
    return null

