title: How to set Primefaces LazyDataModel default SortField
body: <p>Is there a way to set the sortField parameter of a lazyDataModel on first load? I would like the DataTable to be sorted by the first column on render.</p>
  
  <pre><code>@Override
  public List&lt;T&gt; load(int first, int pageSize, String sortField, SortOrder sortOrder, Map&lt;String, String&gt; loadingFilters) { }
  </code></pre>
  
  <p>On first load sortField is empty.</p>
  
  <p>My solution is override sortField when it is empty:</p>
  
  <pre><code>if(!StringUtils.isBlank(getDefaultSort())) {
    sortField = getDefaultSort();
  }
  </code></pre>
  
  <p>But is there no out of the box way?</p>