# Refresh a particular div without reloading the page?

**URL:** <https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214>\
**Category:** Ember CLI\
**Created:** [July 1, 2017, 9:04pm UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214 "2017-07-01T21:04:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [July 1, 2017, 9:04pm UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214/1 "2017-07-01T21:04:49Z")

</div>

how to refresh the just the ember-selectize div without reloading the whole page.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [July 2, 2017, 10:26am UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214/2 "2017-07-02T10:26:25Z")

</div>

If you update the `author` model ember-selectize will update without reloading the page. This seems to be the same bug as the ember-cli-pagination one. I think you somewhere have a `Ember.computed` filter or something that is not listening for change on the correct values. Try skipping this `Ember.computed` for the test.

[https://github.com/broerse/ember-cli-blog/blob/master/app/templates/components/blog-post-edit.hbs#L4](https://github.com/broerse/ember-cli-blog/blob/master/app/templates/components/blog-post-edit.hbs#L4)

---

<div class="post-metadata">

**Author:** ![alice](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@alice](https://discuss.emberjs.com/u/alice)\
**Post date:** [July 2, 2017, 10:39am UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214/3 "2017-07-02T10:39:49Z")

</div>

how should i update the author in the model.

my code—\>

```
 {{ember-selectize
      multiple="true"
      filter="true" 
      remove-item="itemRemoved"
      content=roles
      name="roleIds"
      optionValuePath="content.id"
      optionLabelPath="content.name"      
      update-filter="roleFilterUpdate"
      add-item="selectedRole"
      selection=content.roleIds
      placeholder="--Select--"
      }}

```

export default Ember.Controller.extend({

```
 removedValue:[],
itemRemoved:function(removedItem){
        this.get('removedValue').push(removedItem.id);
    },
    Close: function() {  
       // console.log(">>"+this.get('content.roleIds'));
       let self = this;
       var array = [];
        var roleLength = self.get('content.roleIds');
        roleLength.forEach(function(roleeach) {
            array.push(roleeach.get('id'));
         });
        var finalValue = array.concat(this.get('removedValue'));
        self.set("roleLength",finalValue);
        self.get('model').rollbackAttributes();      
    }
  }

```

});

i dont want to update the value without saving . so, while saving i m retrieving all deleted values… how to get bck all the values???

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [July 2, 2017, 10:44am UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214/4 "2017-07-02T10:44:10Z")

</div>

You can see this in action by going to in one browser to [https://bloggr.exmer.com/](https://bloggr.exmer.com/) login and select `edit` on some post. Go in an other browser to [https://bloggr.exmer.com/](https://bloggr.exmer.com/) login and add an Author. Go back to the first browser and see you Author there without reloading the page. I recommend not to use Safari for this test because it keeps asking for more storage memory. Edge, Chrome, Firefox, IE etc. are all fine.

---

<div class="post-metadata">

**Author:** ![broerse](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/broerse/32/9497_2.png) [@broerse](https://discuss.emberjs.com/u/broerse)\
**Post date:** [July 2, 2017, 10:59am UTC](https://discuss.emberjs.com/t/refresh-a-particular-div-without-reloading-the-page/13214/5 "2017-07-02T10:59:36Z")

</div>

My example is with saving. Have not used the roleback options but values are updated without saving out of the box. Not sure I can help with this.
