Searching/ sorting with Lazy datatable of the primefaces with columns that are class component attributes

Asked

Viewed 8 times

-1

I have a datatable Lazy of the first faces that I need to filter and research, in the Lazy datatable of the first faces every time page, filter or order is executed the following method

public List<T> load(int indice, int quantidade, Map<String, SortMeta> ordenacao, Map<String, FilterMeta> filtro) { .. }

however columns are properties that are components in my class

<p:datatable value=#{bean.lazyModel} var="item" lazy=true ... >
    <p:column headerText="Codigo" sortBy="#{item.codigo}">
        <h:outputLabel value="#{item.codigo}"
    </p:column>
    <p:column headerText="Código Material" sortBy="#{item.material.codigo}">
        <h:outputLabel value="#{item.material.codigo}"
    </p:column>

I need to know how to identify when I am ordering by the code of the Item class and when I am ordering by the code of the Material class

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.