i am new to jdeveloper working with adf projects.
I have a table loaded by a java arraylist that gets data from a rest service.
this is my model
public class model {
String campo1, campo2, campo3;
//construct - Getter and Setter
}
this is my controller
public class controller {
model d = new model();
List<model> lts_person = new ArrayList();
RichTable table;
FilterableQueryDescriptor decriptor;
//construct - Getter and Setter
}
this is my 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>
I have seen that I have to convert from my model to Richtable and then pass it through FilterableQueryDescriptor and return a Descriptor but I don't understand how to do it.
In the af: table I understand that the Descriptor in the filter model and the Binding do not know if necessary.