dynamic view selection is also possible, return a ...
# kohesive
a
dynamic view selection is also possible, return a known object that has the view plus model:
Copy code
@Rendered
public fun UserContext.getCompaniesSearch(name: String, country: String?): Promise<ModelAndRenderTemplate, Exception> {
    return task {
        ...
        ModelAndRenderTemplate(searchResults, "search-${searchType}-results.ftl")
    }
}