title: Cakephp Dropdowns not showing right data when Refreshing the page
body: <p>Ive two dropdown lists one for country and other for cities on my page.
  When i load the page initially i set the country to the default country loaded from the user registeration. Then i load the cities for that country.</p>
  
  <p>The problem is that now when i change the country dropdown and refresh the page my country dropdown selected value remains the same which has changed but the cities are loading from the default country. </p>
  
  <p>I'm getting the right value at the view from the controller but view is not setting it right.
  The code in my view is as follows</p>
  
  <pre><code>echo $this-&gt;Form-&gt;input('from_country_code',
              array(
              'options'=&gt;$countries,
              'id'=&gt;'from_country_code',
              'label' =&gt; __('Country',true),
              'selected'=&gt;$selectedCountryCode
              )
          );
  </code></pre>
  
  <p>Secondly, please explain me that how can i detect that a page is refreshed and retain the changed drop down values and don't execute the whole action controller code.</p>
  
  <p>Any help would be highly appreciated.</p>
  
  <p><em>Updated</em> -- 
  Here its my controller code</p>
  
  <pre><code>function add() {
  
      $currentUser = $this-&gt;Auth-&gt;user();
      $countryMap = $this-&gt;requestAction('/countries/getList/');
      $this-&gt;set('countries',$countryMap);
      $this-&gt;set('selectedCountryCode',$currentUser['City']['countriesCode']);
  
      $cityMap = $this-&gt;requestAction('/cities/getListByCountryCode/'.$currentUser['City']['countriesCode']);
      $this-&gt;set('cities',$cityMap);
  
      if(!empty($this-&gt;data)) {
          if($this-&gt;Request-&gt;saveAll($this-&gt;data)) {
              $this-&gt;Session-&gt;setFlash('The Request was successfully Posted');
              $this-&gt;redirect(array('controller'=&gt;'users','action'=&gt;'requests'));
          }   else {
              $this-&gt;Session-&gt;setFlash('The Request was not saved. Please try again');
          }
      }
  
  }
  </code></pre>
  
  <p>Please note that the issue i'm having is that on page refresh the selected property of the country dropdown is not setting properly. Ive checked the value from controller its coming correctly even if i refresh the page. </p>
  
  <p>Im setting the selected country value in this variable @selectedCountryCode.</p>