开发者

How to add image to a table column in Wicket?

I am creating table with AjaxFallbackDefaultDataTable. I want to add image to each column and when user clicks a开发者_如何学编程ny column for sorting, I want to change this image.

Is this is possible?


This is probably best handled by css.

If you look at this example of an AjaxFallbackDefaultDataTable, you'll note that with no work at all, the headers change background color when clicked.

This happens because of wicket-defined css classes "wicket_orderUp", "wicket_orderDown", and "wicket_orderNone" on the header set by the callbacks when you click on columns, and some default css supplied by wicket.

If you create css that sets a background image for these classes, possibly qualified by other css hierarchy if you don't want it everywhere, you should be able to get changing images with no Java code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜