过滤
Table 组件允许您实现过滤,以根据特定标准缩小显示的数据。可以通过使用与表格关联的 Repository 提供的 setFilter(Predicate<T> filter) 方法来定义过滤标准来实现过滤。
以下示例使用来自搜索字段的用户定义标准和 setBaseFilter() 方法,将过滤器应用于基于 MusicRecord 标题的 CollectionRepository。当触发 commit() 方法时,表格将以过滤后的数据刷新。
笔记
setBaseFilter() 方法属于 CollectionRepository 类,而不是 Table 组件。
继续学习
文章Spring Data JPA grid: sort, filter, and page in Java
文章Java Data Grid: Build Fast, Sortable Tables with webforJ
文章Java CRUD web app with Spring Boot and webforJ, step by step
文章Natural language search for a Java table with webforJ
文章Build internal tools in Java: a framework decision guide
文章Java web front end for a database: browse and edit