Hi all, There are a lot of ways to present a hashmap in a view page but I'm interested in my own GridDateSource implementation. There has been some discussion regarding that on this forum but I could never find an example.
It's easy to just pass the hashmap values back to tapestry grid but how does tapestry figure out table headers, sorting, paging even since the hash map is not ordered? This is just an example of GridDataSource implementation for a CustomSource: public class CustomSource implements GridDataSource { private HashMap<String, String> hashMap; public CustomSource(HashMap<String, String> myHashMap) { this.hashMap = myHashMap; } public int getAvailableRows() { return hashMap.size(); } public void prepare(int startIndex, int endIndex, List<SortConstraint> sortConstraints) { } public Object getRowValue(int index) { } public Class<> getRowType() { } } Could someone please enlighten me with the details? Cheers! -- View this message in context: http://tapestry.1045711.n5.nabble.com/HashMap-as-a-Grid-source-once-again-tp5720533.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org