public WOComponent toggleClicked()
{
String s = key();
boolean caseInsensitive = caseInsensitive();
NSSelector asc = caseInsensitive ? EOSortOrdering.CompareCaseInsensitiveAscending : EOSortOrdering.CompareAscending;
NSSelector desc = caseInsensitive ? EOSortOrdering.CompareCaseInsensitiveDescending : EOSortOrdering.CompareDescending;
if(_isCurrentKeyPrimary())
{
NSSelector nsselector = _primaryKeySortOrderingSelector();
if(nsselector.equals(EOSortOrdering.CompareAscending)
|| nsselector.equals(EOSortOrdering.CompareCaseInsensitiveAscending)) {
_removeSortOrderingWithKey(s);
_makePrimarySortOrderingWithSelector(desc);
} else if (nsselector.equals(EOSortOrdering.CompareDescending)
|| nsselector.equals(EOSortOrdering.CompareCaseInsensitiveDescending)) {
_removeSortOrderingWithKey(s);
_makePrimarySortOrderingWithSelector(asc);
} else {
_removeSortOrderingWithKey(s);
_makePrimarySortOrderingWithSelector(asc);