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)it.next();
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
((com.webmethods.caf.faces.component.table.IExtendedColumn)child).setOrdinal(0);
}
}
#webMethods#webMethods-BPMS#MWS-CAF-Task-Engine