You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Simon Kitching <sk...@obsidium.com> on 2005/11/16 00:49:55 UTC

Does style attribute on t:column class work?

Hi,

I am trying to set a max width for one particular column in an html 
table. The h:dataTable attribute "columnClasses" can be used to assign a 
style-class to all the columns but that's clumsy for my particular usage.

The t:column tag has "style" and "styleClass" attributes. However 
neither of them seem to work for me. Has anyone successfully used these?

 From looking at HtmlTableRendererBase, I would *not* expect them to 
work. The table renderer tends to manage the column's children directly 
rather than ask the UIColumn to render itself. Method 
HtmlTableRendererBase.renderColumnHeaderCell seems to be responsible for 
emitting <TH> tags, but doesn't look for style or styleClass attributes 
on the column object.

Have I missed something?

Regards,

Simon

Re: Does style attribute on t:column class work?

Posted by Bruno Aranda <br...@gmail.com>.
I don't know, but I am using t:columns successfully (inside a
t:dataTable) to show different cell background colors depending on the
type of the item inside the cell...

Bruno

2005/11/16, Simon Kitching <sk...@obsidium.com>:
> Hi,
>
> I am trying to set a max width for one particular column in an html
> table. The h:dataTable attribute "columnClasses" can be used to assign a
> style-class to all the columns but that's clumsy for my particular usage.
>
> The t:column tag has "style" and "styleClass" attributes. However
> neither of them seem to work for me. Has anyone successfully used these?
>
>  From looking at HtmlTableRendererBase, I would *not* expect them to
> work. The table renderer tends to manage the column's children directly
> rather than ask the UIColumn to render itself. Method
> HtmlTableRendererBase.renderColumnHeaderCell seems to be responsible for
> emitting <TH> tags, but doesn't look for style or styleClass attributes
> on the column object.
>
> Have I missed something?
>
> Regards,
>
> Simon
>