title: Backbone.js - using trigger to trigger event and pass data
body: <p>I'm writing a tab menu component using backbone.js as an MVC framework. When a user clicks on a tab, the component will switch tabs (internal operation), but then I would like listeners of the component to respond to the action associated with the event. The idea behind this is that I'm abstracting the various clicks into specific actions. For instance, the model for each tab is a hash with the following structure:</p>
  
  <pre><code>{
      label : &lt;string&gt;,
      actionCommand : "save",
      tabClass : &lt;string&gt;
  }
  </code></pre>
  
  <p>The event that will be triggered will be called "action," so listeners will respond to "action" but will then forward the specific command. For instance:</p>
  
  <pre><code>this.trigger("action", {actionCommand: "save"});
  </code></pre>
  
  <p>The listener in turn would handle the event similarly to the following:</p>
  
  <pre><code>handleAction : function(event) {
    if (event.actionCommand == "save") {
      ...do something...
    }
  </code></pre>
  
  <p>}</p>
  
  <p>Is this possible? I couldn't glean this from the documentation. Thanks in advance for any insight you can offer.</p>