title: Joomla 2.5 filter, sort and pagination combination
body: <p>I've developed a Joomla frontend data table with paging, filtering and sorting.
  Pagination works. Column sort alone works too. </p>
  
  <p>But as example when I sort a column by name, and then go to page 2 (or any other) it shows me the chosen page without the sort. The sort has just disappeared. This is the same for every column.  </p>
  
  <p>I derived my model class from JModelList and my PopulateState Method is below.</p>
  
  <pre><code>protected function populateState($ordering = 'ordering', $direction = 'DESE')
      {
          // Initialise variables.
          $app = JFactory::getApplication();
  
          $filter_order = JRequest::getCmd('filter_order');
          $filter_order_Dir = JRequest::getCmd('filter_order_Dir');
          $search = $this-&gt;getUserStateFromRequest($this-&gt;context.'.filter.search', 'filter_search');
  
          $this-&gt;setState('filter_order', $filter_order);
          $this-&gt;setState('filter_order_Dir', $filter_order_Dir);
          $this-&gt;setState('filter.search', $search);
  
          parent::populateState();
      }
  </code></pre>