title: passing data from controller to model in Joomla 2.5
body: <p>I am developing a joomla 2.5 component where I need to pass data from <strong>controller</strong> to <strong>model</strong>. The controller is receiving data from url. I find that controller is getting the value properly. Now I need to move that value to model from controller. From different post I have found a snippet of code for controller like below.</p>
  
  <pre><code>$datevalue = JRequest::getVar('day',$day); //receiving value from view
  $item = JRequest::setVar('day',$datevalue); //setting variable
  
  $model =&amp; $this-&gt;getModel('WeeklyProgram'); //assign model
  $model-&gt;setState('dayVar', $item); // assign value for model
  </code></pre>
  
  <p>The problem is that I don't know how to receive this value 'dayVar' from model. Can anybody help me on this issue? Thanks.</p>