/** Sets the sort direction. This does not sort the data, it only serves * as an indicator as to how the list is sorted. (unless the listbox has "autosort" attribute) * * <p>If you use {@link #sort(boolean)} to sort list items, * the sort direction is maintained automatically. * If you want to sort it in customized way, you have to set the * sort direction manually. * * @param sortDir one of "ascending", "descending" and "natural" */ public void setSortDirection(String sortDir) throws WrongValueException { if (sortDir == null || (!"ascending".equals(sortDir) && !"descending".equals(sortDir) && !"natural".equals(sortDir))) throw new WrongValueException("Unknown sort direction: " + sortDir); if (!Objects.equals(_sortDir, sortDir)) { _sortDir = sortDir; if (!"natural".equals(sortDir) && !_ignoreSort) { Listbox listbox = getListbox(); if (listbox != null && listbox.isAutosort()) { doSort("ascending".equals(sortDir)); } } smartUpdate("sortDirection", _sortDir); //don't use null because sel.js assumes it } }
return false; final Listbox box = getListbox(); if (box == null) return false;
if (cmpr != null) { final Listbox listbox = getListbox(); if (listbox.getModel() == null) {
return false; final Listbox listbox = getListbox(); if (listbox == null) return false;