Jdev 11.1.1.9
HI,
I encountered a similar issue where from taskflow A (contains jsff A), go to taskflow B (contains jsff B) withaf: table that have filter enabled. Enter search text in the search field above the "Name" column header, got the search result. Then return to taskflow A. Then go to taskflow B again. The QBE retained previous search value.
I read the example:
https://tompeez.wordpress.com/2011/10/29/jdev-how-to-reset-a-filter-on-an-aftable/
This blog shows how to reset the QBE using an action button resetTableFilter(ActionEvent actionEvent)
My requirement is to clear the QBE values when entering the page, not through an action event after entering the page.
I tried to use a dummy method (tied to table shortDesc) that contains the QBE reset codes so it get called when entering jsff B from jsff A, but got null when getFilterCriteria. Here's the code snipplet:
<af:table value="#{bindings.OptInAuditHistoryVO1.collectionModel}"
var="row"
rows="#{bindings.OptInAuditHistoryVO1.rangeSize}"
emptyText="#{bindings.OptInAuditHistoryVO1.viewable ? applcoreBundle.TABLE_EMPTY_TEXT_NO_ROWS_YET : applcoreBundle.TABLE_EMPTY_TEXT_ACCESS_DENIED}"
fetchSize="#{bindings.OptInAuditHistoryVO1.rangeSize}"
rowBandingInterval="0"
filterModel="#{bindings.OptInAuditHistoryVO1Query.queryDescriptor}"
queryListener="#{bindings.OptInAuditHistoryVO1Query.processQuery}"
filterVisible="true" varStatus="vs" id="t1"
autoHeightRows="#{CommonUtilBean.autoHeightRows}" width="100%"
columnStretching="column:c6"
summary="#{AsmCommonSetupGenBundle['Header.OptInHistory.OfferingOptInHistory']}"
contentDelivery="immediate"
binding="#{OptInAuditHistoryBean.auditHistoryTable}"
shortDesc="#{OptInAuditHistoryBean.tableShortDesc}">
In the bean:
| public String getTableShortDesc() { |
| System.out.println("Enter getTableShortDesc"); |
| if (needInit) { |
| needInit = false; |
| initQbeQuery(); |
| } |
| return "Search"; |
| } |
| public void initQbeQuery() { |
| System.out.println("Enter initQbeQuery"); |
| if (getTableFilterCriteria() == null) { |
| System.out.println("table criteria is null"); |
| } else { |
| System.out.println("table criteria is NOT null"); |
| } } | private Map getTableFilterCriteria() { | | return getTableQueryDescriptor().getFilterCriteria(); | | } |
|
private FilterableQueryDescriptor getTableQueryDescriptor() { |
return (FilterableQueryDescriptor)getAuditHistoryTable().getFilterModel(); |
} |
Result: table criteria is null
Please advise.
Thanks
-Mina