javafx - JavaFX - ListProperty 条件绑定
问题描述
在我的代码中,我有一个绑定到 ListProperty 的 tableview。我能够正确检索所有数据,但我需要根据其中每个对象的特定属性对该数据集应用条件。可能吗?这是模型:
public class Ticket {
private String number;
private String sys_id;
private String short_description;
private String description;
private String opened_by;
private String assigned_to; // tabella esterna
private String assignment_group; // tabella esterna
private int incident_state; // 2: assigned - 3: wip - 4: hold
private String sys_created_on;
private Date sys_updated_on;
private int priority; // 1: critical
private boolean isVisible; // per nasconderlo nella tabella riassuntiva
private boolean isAlarmed; // per silenziare le notifiche
在控制器中,我已将 tableview 绑定到 ListProperty(由 ticketService.ticketsProperty() 返回):
serviceNowTicket_tableView.itemsProperty().bindBidirectional(ticketService.ticketsProperty());
我只需要通过票“isVisible”属性过滤它。也许通过 BooleanBinding?
解决方案
推荐阅读
- sql - SQLite 递归查询以返回给定路径的 ID
- html - 如何从 Gmail“显示原始文件”中删除 =20 等
- excel - 文件重命名宏退出而立即循环
- java - 搜索特定参数 Java 的数组
- python - 如何多次重定向到页面并使用 django 更新页面上的信息
- masm32 - 为什么过程中使用lengthof指令得到的值是错误的?
- python - 使用 Python 检索 Power BI 的 Rest API 的访问令牌?
- html - div内内容的排序
- linux - Linux 记录器的替代品
- oracle-cloud-infrastructure - 无法列出公共存储桶中的内容