129130131132133134135136137138139
hLayout.addMember(button); vStack.addMember(hLayout); tileGrid.fetchData(null, new DSCallback() { public void execute(DSResponse response, Object rawData, DSRequest request) { tileGrid.sortByProperty("lifeSpan", true); } }); return vStack; }
151152153154155156157158159160161
public void onItemChanged(ItemChangedEvent event) { String sortVal = sortForm.getValueAsString("sortBy"); Boolean sortDir = (Boolean) ascendingItem.getValue(); if(sortDir == null) sortDir = false; if(sortVal != null) { tileGrid.sortByProperty(sortVal, sortDir); } } }); vStack.addMember(sortForm);