How to sort a Column in a Table that containing image?

I wish I could sort a column that contains an image ( see Label “severityLogo”) by a particular Object property (See property “priority”).
I see the image for every row, but if I click the Column Header, rows are not sorted.

Here my code:

Extract of my

@Table(name = "allarm")
public class Allarm implements Serializable{

@Column(name = "priority")
private Integer priority;

/* ...other code.... */

 private Label severityLogo;

public Label getSeverityLogo() {
		String urllogo  = "<img src=\"" + VaadinServlet.getCurrent().getServletContext().getContextPath() +"/"+ NAME_IMAGE + "\" /> ";
		Label imgL = new Label(urllogo, ContentMode.HTML);
		return imgL;

Extract of my View where I build my Table

allarms= JPAContainerFactory.make(Allarm.class,

Table t = new Table() {
            protected String formatPropertyValue(Object rowId, Object colId,
                    Property<?> property) {
                if (colId.equals("data") || colId.equals("lastcheck")) {
                    SimpleDateFormat df = new SimpleDateFormat();
                    return df
                            .format(((Date) property.getValue()).getTime());
                return super.formatPropertyValue(rowId, colId, property);
        t.addContainerProperty("severityLogo", Label.class, "priority"); //I want to order this column!!!!

        t.sort(new Object[] { "priority" }, new boolean[]
 { false});
        t.setVisibleColumns(new Object[] { "severityLogo", "name", "place", "data"});
        t.setColumnHeaders(new String[] { "Severity", "Name", "Place", "Data"});

You can add a HeaderClickListener to your table and do your sorting manually in there for the respective columns.

Or you can set a custom ItemSorter for the container if it supports one - several of the standard in-memory containers do.
Most database containers use container specific approaches to customize sorting.

You could also use a generated column which is backed e.g. by a transient Boolean field or other simple sortable field in your entities to avoid having Label instances there.