use of org.motechproject.mds.web.domain.RelationshipsUpdate in project motech by motech.
the class InstanceController method getRelatedValues.
@RequestMapping(value = "/instances/{entityId}/instance/new/{fieldName}", method = RequestMethod.POST)
@ResponseBody
public Records<BasicEntityRecord> getRelatedValues(@PathVariable Long entityId, @PathVariable String fieldName, String filters, GridSettings settings) {
RelationshipsUpdate filter = parseRelatedInstancesFilter(filters);
QueryParams queryParams = QueryParamsBuilder.buildQueryParams(settings);
Records<BasicEntityRecord> records = instanceService.getRelatedFieldValue(entityId, null, fieldName, filter, queryParams);
processFieldsForUI(records);
return records;
}
Aggregations