Hi,

You need to override
org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn.getHeader(String)
and return the component returned by super.getHeader(id) + your
attributemodifier.

On Mon, Dec 12, 2011 at 10:12 AM, lucast <[email protected]> wrote:
> Dear Forum,
> I'm using a DefaultDataTable (structure almost identical to  clickable cell
> example from chapter 5, Apache Wicket Cookbook).
>
> I want one particular column to have a different css class to the rest.
> For that reason, when extending AbstractColumn<T>, I add the css class to
> populateItem method:
>
> public void populateItem(Item<ICellPopulator<T>> cellItem, String
> componentId, IModel<T> rowModel) {
>        cellItem.add(new SimpleAttributeModifier("class", "nameOfCssClass"));
> ...
> }
>
>
> That works fine for each cell but the class is not added to the column
> header.
> Is there a way to add a class to the column header for AbstractColumn?
>
> Thanks in advance,
> Lucas
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/adding-css-class-to-AbstractColumn-table-header-tp4185280p4185280.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to