Search in sources :

Example 1 with ViewRowAttributesLayout

use of de.metas.ui.web.view.descriptor.ViewRowAttributesLayout in project metasfresh-webui-api by metasfresh.

the class ViewRowAttributesRestController method getAttributesLayout.

@GetMapping("/layout")
public JSONViewRowAttributesLayout getAttributesLayout(// 
@PathVariable(PARAM_WindowId) final String windowIdStr, // 
@PathVariable(PARAM_ViewId) final String viewIdStr, // 
@PathVariable(PARAM_RowId) final String rowIdStr) {
    userSession.assertLoggedIn();
    final ViewId viewId = ViewId.of(windowIdStr, viewIdStr);
    final ViewRowAttributesLayout layout = viewsRepo.getView(viewId).getById(DocumentId.of(rowIdStr)).getAttributes().getLayout();
    return JSONViewRowAttributesLayout.of(layout, newJSONOptions());
}
Also used : ViewRowAttributesLayout(de.metas.ui.web.view.descriptor.ViewRowAttributesLayout) JSONViewRowAttributesLayout(de.metas.ui.web.view.json.JSONViewRowAttributesLayout) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Aggregations

ViewRowAttributesLayout (de.metas.ui.web.view.descriptor.ViewRowAttributesLayout)1 JSONViewRowAttributesLayout (de.metas.ui.web.view.json.JSONViewRowAttributesLayout)1 GetMapping (org.springframework.web.bind.annotation.GetMapping)1