How to change String in table column into Button ?


my table is created in this way:

 table.setVisibleColumns(new Object[] { t, n, fully, partially});
 table.setColumnHeader(t, T_LABEL);

 HierarchicalContainer hc = new HierarchicalContainer();
 hc.addContainerProperty(t, String.class, "");
 hc.addContainerProperty(P, Integer.class, 0);

 Item item = hC.addItem(ItemWrapper);

I want to change property (P (Integer)) in table into button, like this:

Button detailsField = new Button("show details");
    detailsField.addClickListener(new Button.ClickListener() {
        public void buttonClick(ClickEvent event) {
            // Get the item identifier from the user-defined data.
            Integer iid = (Integer)event.getButton().getData();
  "Link " +
                              iid.intValue() + " clicked.");
    // Create the table row.
    table.addItem(new Object[] {sumField, transferredField,
                                commentsField, detailsField},

in this way, I will have possibility to add action to column in table…

How May I reach this functionality in my case (hierarchicalContainer + other way in adding elements to table) ?


Take a look at
Generated Table Columns
in Book of Vaadin. I think they will help you achieve what you want.