title: refresh page with joomla component
body: <p>I have a simple form in my tmpl/default.php:</p>
  
  <pre><code>&lt;form id='AddForm' action="&lt;?php echo JRoute::_('index.php?option=com_mycomponent&amp;task=addcam'); ?&gt;" &gt;
              &lt;p&gt;
              &lt;label for="CamName"&gt;Name:
              &lt;/label&gt;
              &lt;input type="text" id="CamName" name="cam_name" /&gt;
              &lt;/p&gt;
              &lt;button type='submit' class='submit_cam' name='addcam' value='Add'&gt;Add&lt;/button&gt;
              &lt;button type='reset' class='cancel_changes' name='cancel_changes' value='Cancel'&gt;Cancel&lt;/button&gt;
          &lt;/form&gt;
  </code></pre>
  
  <p>In my controller.php file I'm trying to process the values:</p>
  
  <pre><code>function addcam()
  {
      $add_name=JRequest::getString('cam_name');
      $model = &amp;$this-&gt;getModel();
      $model-&gt;AddWebcam($add_name); //send to model to add to DB
  }
  </code></pre>
  
  <p>In my model I just return the result of the query. With this implementation I just get routed to an empty page. I'd like to have it refresh the current page. Typically you do this with <code>action=""</code> but in my case I need it to route to the function called <code>addcam</code> in the controller. Or is there a better way to do this?</p>