Hi
I am working on implementing Table Filtering in my WD Java application in CE7.2 environment.
Filter functionality is working fine but the issue is I don't get my original data back in to my table after filtering.
Once filtered, my table always shows filtered values only.
Below is the code I have written.
wdDoModifyView
public void wdDoModifyView(com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
//Logic to Sort
if(firstTime){
viewName=view;
IWDTable table = (IWDTable)view.getElement("tblRequests");
setSortandFilterAttributes();
wdContext.currentContextElement().setTableFilter( new TableFilter( table, wdThis.
wdGetFilterAction(),
(IWDNode)wdContext.nodeResultSet(), null ) );
}
//@@end
}
onActionViewAllRequests: To get original data back in my table.
public void onActionViewAllRequests(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionViewAllRequests(ServerEvent)
//Remove Any Filter Attributes
wdContext.nodeFilterAttributes().invalidate();
//Invalidate table node
wdContext.nodeResultSet().invalidate();
wdContext.currentContextElement().setRequestId("");
wdContext.currentFilterAttributesElement().setRequestStatus("");
WDCopyService.copyCorresponding(wdContext.nodeRequestsFindByUser(), wdContext.nodeResultSet());
//@@end
}
I am not sure where am I going wrong.
I followed tutorial at below link.
I also noticed that in CE7.2, wdContext.currentContextElement().getTableFilter().filter(); does not accept arguments, where as in tutorial which is actually for CE7.1 environment, it accepts arguments.
Any help will be highly appreciated.
Thank you.
Regards
Vineet