首页 > 解决方案 > 如何使用数组列表对象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 不知道是否有必要。

标签: javafilteroracle-adfjspx

解决方案


推荐阅读