Search Result Table - Reset Sorting


We are using a “Search Result Table” component. On this component the user can sort the table by multiple column by clicking the header of a column. How can a user reset this custom sorting. The only way I found was to log out and log in again.


If you are using the typical search portlet patterns, the sorting is automatically reset to the default whenever a new search is executed from the searchbar portlet.

Or to programatically reset the sorting from java code you would have to get the table control and iterate through each of the columns and set the ordinal back to the default.

For example:

//get the search result control
DataTable dataTable = getActiveSearchResultsControl();

//iterate through each of the columns and clear the sort ordinals
for (Iterator it = dataTable.getChildren().iterator(); it.hasNext();) {
	UIComponent child = (UIComponent);
	if (child instanceof com.webmethods.caf.faces.component.table.IExtendedColumn) {
		//set ordinal to 1 for primary sort column, or 0 for no sorting for the column

Of course - I wonder why I did not think about searching again. Thanks for the response. The programmatic solution is also interesting.


If i am using this search result table…

In Export button i am unable to export all data…it is exporting only first page details…