title: Setting Content via Response Object in Components
body: <p>Can someone explain to me why the following code isn't outputting anything in a component? Does the response object in a component behave differently from that in an action (since the code works as part of an action)?</p>
  
  <p>I am using Symfony 1.4. </p>
  
  <pre><code>$this-&gt;getResponse()-&gt;setContent("OK");
  </code></pre>
  
  <p>Code block:</p>
  
  <pre><code>class merchantComponents extends sfComponents
  {
    .....
    public function executeAjaxrcmc(sfWebRequest $request)
    {
      $company_user_id = $this-&gt;getRequestParameter('ids');
  
      if(($company_user_id&gt;0) &amp;&amp; $request-&gt;isMethod('post'))
      {               
          $this-&gt;getResponse()-&gt;setContent("OK");
          return sfView::NONE;
      }
      else
      {
          $this-&gt;getResponse()-&gt;setContent("FAIL");
          return sfView::NONE;            
      } 
    }
  ....
  }
  </code></pre>
  
  <p>Thanks in advance!</p>