Question

I have a page with ADF Query and Trinidad table. Searching with af:query works well and populates the table with data.

On initial page load (when I enter the page for the first time), when no search was made, the tr:table is empty. I would like to change this default behaviour and make the table display all of the data until a search is being made. When I press the 'search' button with empty query, all data is being fetched. So, as I see it, I would need to execute a empty query search on page load and populate the table with all of data. The question is, how? Or is there another way to get all data in the table before search is made?

If it is any help, the code of components I've used:

<af:query id="qryId1" headerText="Search"
    disclosed="true"
    value="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryDescriptor}"
    model="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.queryModel}"
    queryListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQuery}"
    queryOperationListener="#{bindings.WcSpaceHeaderViewSearchCryteriaQuery1.processQueryOperation}"
    resultComponentId="::t3" saveQueryMode="hidden"
    displayMode="compact"/>
    ....
</af:query>

<tr:table value="#{bindings.WcSpaceHeaderView14.collectionModel}"
    var="row"
    rows="#{iteratorBacking.rowsPerPage}"
    emptyText="#{bindings.WcSpaceHeaderView14.viewable ? 'No data to display.' : 'Access Denied.'}"
    id="t3"
    width="960"
    partialTriggers="qryId1 ctb1 ctb2 ctb3">
    ...
</tr:table>

Thanks.

Was it helpful?

Solution

It turns out, that the automatic search on page load can be set in the View Criteria settings. In the tab UI Hints check Query Automatically and that's all. When I enter the page I get all results I wanted.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top