List of usage examples for com.vaadin.client.widget.grid.datasources ListDataSource ListDataSource
public ListDataSource(T... rows)
From source file:lh.api.showcase.client.BasicAbstractFormResultView.java
License:Apache License
@SuppressWarnings("unchecked") @Override/*from w ww .ja v a 2s .co m*/ public void setJson(String json, JsonParser<?> parser) { textArea.setText(json); if (parser != null) { try { grid.setDataSource(new ListDataSource<T>((List<T>) parser.parse(json))); } catch (NullPointerException /*| com.google.gwt.core.client.JavaScriptException*/ e) { logger.log(Level.SEVERE, "Error occurred while parsing the json string", e); } } }