However I'm still using HAL with _embedded resources to display lists (as a table) which the user can search in and then click on an entry to get to the "edit" page of that resource.
This design has the flaw that I don't know the types of the different columns and therefore have to do a best guess when creating the different filters for the colums (text, number, date, ...)..
I would like to use HAL-FORMS in some kind to display the table and know which filters I should render for the different columns, but I'm not sure how to best represent a list with filters using HAL-Forms.
Two possible implementations come to my mind:
1. Combine a form-template and _embedded resources in one response.
The form would have all the columns as properties. My fear here is that I'm creating a too tight coupling between the API and the UI because the UI would need to know that for these lists, it needs to render the form differently than on an "edit" page.
2. Using one form-template that has a list of nested templates.
I'm already using a custom property type "collection" to represent nested resources in forms. However this would mean that I need to repeat the attributes for every entry in the list, while the UI only needs this one time, as they are all the same for each entry.
Is there any good example or hints for how to use HAL-FORMS to render a table with filters out of a list of resources?