I want to receive typed List via RPC and then link it to ListDataProvider. Then ListDataProvider must show this list in CellTable. But List, which I get from RPC, doesn't show up in CellTable. I created a simple List without RPC and linked it to ListDataProvider. This List showed up successfully. With help of debugger I found difference between these 2 Lists (variables):
- Structure of variable got from RPC is elementData->[0],[1],...
- Structure of variable with simple List is list->elementData->[0],[1],...
Here I send List via RPC:
public List<Pravform> greetServer(String input) throws IllegalArgumentException {
...
TypedQuery<Pravform> query = em.createQuery("SELECT p FROM Pravform p",Pravform.class);
List<Pravform> categoryList = query.getResultList();
return categoryList;
}
Here I link List to ListDataProvider.
public void onSuccess(List<Pravform> result) {
List<Pravform> listPf = dataProvider.getList();
listPf = result;
}
Please tell me, what did I do wrong?