The following snippet displays the list of Cats successfully, however when I flush the driver the values in the Cat objects are all null.
The name of the cat house can be edited as expected.
HasDataEditor<CatProxy> residentsEditor= HasDataEditor.of(cellTable)
CatHouse{
String name;
List<Cat> residents;
}
Cat{
String name;
String favoriteColor;
}
Here is how I am creating the request. (Adapted from the MobileWebApp sample project)
// Flush the changes into the editable CatHouse.
final CatHouseRequest context = (CatHouseRequest) clientFactory.getCatHouseEditView().getEditorDriver().flush();
/*
* Create a persist request the first time we try to save this task. If
* a request already exists, reuse it.
*/
if (taskPersistRequest == null) {
taskPersistRequest = context.updateCatHouse(editTask).with(
clientFactory.getCatHouseEditView().getEditorDriver().getPaths());
}
// Fire the request.
taskPersistRequest.fire(new Receiver<ActionProxy>() {
@Override public void onConstraintViolation(final Set<ConstraintViolation<?>> violations) {
...
}
@Override public void onSuccess(final CatHouseProxy response) {
...
}
});
I've inspected the taskPersistRequest variable right before it was fired.
taskPersistRequest.propertyRefs = [catHouse]
taskPersistRequest.requestContext has the correct values for the CatHouse and the Cats.
taskPersistRequest.requestData.parameters only has one value for CatHouse with no data related to Cats. (This looks like the problem)
The editProxies variable in context has the correct values for the CatHouse and Cat.