# Connector Classes and Actions

**URL:** <https://meta.discourse.org/t/connector-classes-and-actions/54813>\
**Category:** Development\
**Created:** [27 ديسمبر 2016، 5:24ص UTC](https://meta.discourse.org/t/connector-classes-and-actions/54813 "2016-12-27T05:24:57Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![skoota](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skoota/32/65472_2.png) [@skoota](https://meta.discourse.org/u/skoota)\
**Post date:** [27 ديسمبر 2016، 5:24ص UTC](https://meta.discourse.org/t/connector-classes-and-actions/54813/1 "2016-12-27T05:24:57Z")

</div>

I am using the plugin outlet `composer-fields` to add a new text field to the compose window for a new topic. When the user clicks the “Create Topic” button I would like the data in that field to be stored as a custom field for the topic.

Under the “old” approach of extending a controller I am reasonably confident with doing this, but I am having difficulties using the new connector classes approach outlined in the post [Important changes to Plugin Outlets for Ember 2.10](https://meta.discourse.org/t/important-changes-to-plugin-outlets-for-ember-2-10/54136).

In particular, I don’t know how to run code in response to the topic being created. I am guessing it is not an action, since the code execution is not being triggered in response to an action on that particular control. I am instead trying to observe `model.createdPost` but cannot figure out how to get this working.

I have put this underneath `setupComponent` in the connector class, but it never runs:

```
saveAfterCreating: function() {
    console.log(createdPost);
  }.observes('model.createdPost')

```

Any suggestions appreciated!

**EDIT:** Am I also somehow still able to reopen the `ComposerController` to implement a `save()` method, which I assume will be called automatically when the composer saves its content?

```
ComposerController.reopen({
   actions: {
      save() {
         console.log("save");
      }
   }
})

```

---

_[View the full topic](https://meta.discourse.org/t/connector-classes-and-actions/54813)._
