FacesContext context = getFacesContext();
ArrangeableState state = createArrangeableState(context);
if (dataModel instanceof Arrangeable) {
arrangeable = (Arrangeable) dataModel;
} else if (state != null) {
ArrangeableModel arrangebleModel = new ArrangeableModel(dataModel, getVar(), getFilterVar());
dataModel = arrangebleModel;
arrangeable = arrangebleModel;
}
if (arrangeable != null) {