java - 如何使用数组列表对象java向我的adf表添加过滤器?
问题描述
我是使用 adf 项目的 jdeveloper 新手。
我有一个由 java arraylist 加载的表,该表从休息服务获取数据。
这是我的模型
public class model {
String campo1, campo2, campo3;
//construct - Getter and Setter
}
这是我的控制器
public class controller {
model d = new model();
List<model> lts_person = new ArrayList();
RichTable table;
FilterableQueryDescriptor decriptor;
//construct - Getter and Setter
}
这是我的 jspx -> af:table
<af:table summary="demo" var="row" rowBandingInterval="1" id="t1"
inlineStyle="width:60.0%;" value="#{lista.lts_person}"
rowSelection="single" varStatus="vs"
filterModel="#{lista.table}" filterVisible="true"
emptyText="Data Not Found">
<af:column sortable="true" headerText="Codigo" id="c1"
filterable="true" sortProperty="campo1">
<af:outputText value="#{row.campo1}" id="ot1"/>
</af:column>
<af:column sortable="true" headerText="Nombres" id="c3"
filterable="true" sortProperty="campo2">
<af:outputText value="#{row.campo2}" id="ot2"/>
</af:column>
<af:column sortable="true" headerText="Apellidos" id="c2"
filterable="true" sortProperty="campo3">
<af:outputText value="#{row.campo3}" id="ot3"/>
</af:column>
</af:table>
我已经看到我必须从我的模型转换为 Richtable,然后通过 FilterableQueryDescriptor 传递它并返回一个 Descriptor,但我不明白该怎么做。
在 af: 表中,我了解过滤器模型中的 Descriptor 和 Binding 不知道是否有必要。
解决方案
推荐阅读
- php - Symfony 5 不会加载 CSS 文件
- javascript - 引用类的方法和 `this` 的行为
- angular - 如何使用 *ngIf 隐藏所有 mat-checkboxes/mat-radio-buttons
- angular - 我在 Angular 变更检测中的断点未在 checkAndUpdateView() 上触发
- javascript - 如何模拟 MSAL 身份验证?
- git - 是否有可能通过在推送之前拉出他的分支、变基和删除他的提交来搞乱同事的代码?
- r - 在多个日期范围之间过滤
- html - 更改 Bootstrap 导航链接颜色
- bootstrap-4 - 在引导程序中创建一个居中的导航栏,该导航栏在有或没有滚动条的情况下保持在相同的位置
- javascript - Bootstrap Datepicker getDate 不返回值