Row Filter Value Binding

Hi Guys,

I want to filter a table in UI based on a table column. The filter criteria (i.e., based on which column to filter the table) gets defined at run time.

I am using FilterableSelectableListTableContentProvider to filter the table data. When binding a static expression such as below, the filtering works.


	private static final String[][] TABLEDATAPROVIDER_PROPERTY_BINDINGS = new String[][] {
			{ "#{tableDataProvider.rowType}",
					"com.webmethods.caf.wsclient.service.row" },
			{ "#{tableDataProvider.rowVariable}", "rowType" },
			{ "#{tableDataProvider.rowIdBinding}", "#{rowType.rowID}" },
			{ "#{tableDataProvider.array}",
					"#{pageView.getService.result.appResponse.rows}" },
			[i]{ "#{tableDataProvider.rowFilterValueBinding}",
					"#{rowType.rowCategory}" }, };[/i]

However, when I assign a value to tableDataProvider.rowFilterValueBinding param at run time based on user actions, the filtering is not getting applied based on the new value that I set for this param .

The way I set the value for this param at run time is as below. But the filtering is not working based on the updated filter criteria. Could you please advise if I’m missing any configuration to dynamically filter the table data?


this.getTableDataProvider().setRowFilterValueBindingAsString("#{rowType.rowCreatedBy}");
this.getTableDataProvider().refresh();

regards,
Raj

Hi Raj,
you tried to filter by a table column which cannot work. Rather try to filter by a string variable as explained in this excellent answer.

Best regards,
Marcus