cancel
Showing results for 
Search instead for 
Did you mean: 

Table data not getting populated after filtering

Former Member
0 Kudos

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.

[url] http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f024364b-3086-2b10-b2be-c0ed7d33f... [url]

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

Accepted Solutions (0)

Answers (1)

Answers (1)

marcel_frei
Participant
0 Kudos

Hi vineet,

Please have a look at the following tutorial:

[How to Implement a Web Dynpro for Java Table with Sorting and Filtering Capabilities|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0cf0997-2e08-2d10-b08e-964a2c04c47a]

It's newer than the one you mentioned. It explains how to use the new filtering possibilities where you don't have to create a node for the original data and one for the filtered data. It's much simpler now compared to older WebDynpro versions.

Marcel

Former Member
0 Kudos

Hi Marcel

Link sent by you was helpful and good but did not solve my problem.

I figured out a workaround for my issue.

I invalidated the filter node and called filter action.

This way, data is getting filtered based on blank filter values and is giving original data set back in the table.

Thank you for the help.

Regards

Vineet