public void perform(SortActionEvent sortEvent) {
if (LOG.isDebugEnabled()) {
LOG.debug("sorterId = {}", sortEvent.getComponent().getId());
}
UIColumn column = sortEvent.getColumn();
AbstractUISheet data = (AbstractUISheet) sortEvent.getComponent();
Object value = data.getValue();
if (value instanceof DataModel) {
value = ((DataModel) value).getWrappedData();
}
FacesContext facesContext = FacesContext.getCurrentInstance();
SheetState sheetState = data.getSheetState(facesContext);
Comparator actualComparator = null;
if (value instanceof List || value instanceof Object[]) {
String sortProperty;
try {
UIComponent child = getFirstSortableChild(column.getChildren());
if (child != null) {
String attributeName = child instanceof AbstractUICommand ? Attributes.LABEL:Attributes.VALUE;
if (FacesUtils.hasValueBindingOrValueExpression(child, attributeName)) {
String var = data.getVar();
String expressionString = FacesUtils.getExpressionString(child, attributeName);
if (isSimpleProperty(expressionString)) {
if (expressionString.startsWith("#{")
&& expressionString.endsWith("}")) {
expressionString =