Hi,

The Column provides the component that is used for the cell in the table.

Look at subclassing property column and overriding this method:

public void populateItem(Item<ICellPopulator<T>>  item, String componentId, 
IModel<T>  rowModel)
        {
                item.add(new Label(componentId, createLabelModel(rowModel)));

        }


Instead of adding a label to the cell add in your ImageAjaxLink (or whatever panel you need).

I would recommend creating a new concrete class to hold the new column but you could use a dynamic inner class for prototyping purposes.

Regards,

Mike
hi, i want to inserto in my datatable an image like this:

private ImageAjaxLink mailImg;

mailImg = new ImageAjaxLink("mailImg", bean.isMail()));

now my table is:

columns.add(new PropertyColumn(new StringResourceModel("label.col5", this,
null), "col5"));

provider = new TotalConsPagoProveedoresProvider("col1", false);
table = new DefaultDataTable("table", columns, provider, Integer.valueOf(new
StringResourceModel("rowsPerPage", this, null).getString())){

again, how can i add "mailImg" in "columns" of my table

tks!



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to