You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Matt Hughes <mh...@chariotsolutions.com> on 2006/04/18 21:42:18 UTC

styleClass attribute on t:column having no effect when columnClasses attribute is present on t:dataTable

If you have a dataTable as such:

<t:dataTable
    columnClasses="colClassOne, colClassTwo, colClassThree"
    value=".." >

    <t:column styleClass="editMode"></t:column>
    <t:column styleClass="viewMode"><t:column>
</t:dataTable>


The rendered HTML only has the style classes specified in the 
columnClasses attribute.  Is this the desired effect?  I was not able to 
find any documentation specifying what was supposed to happen if you had 
both of them.  I believe that the styleClass attribute on the t:column 
element should be *added* not ignored.  So the resulting HTML *should* 
IMHO look like this.

<table>
    <tr>
    <td class="colClassOne editMode"></td>
    <td class="colClassTwo viewMode"></td>
    <td class="colClassThree"></td>
    </tr>
</table>

Instead of:

<table>
    <tr>
    <td class="colClassOne"></td>
    <td class="colClassTwo"></td>
    <td class="colClassThree"></td>
    </tr>
</table>

Re: styleClass attribute on t:column having no effect when columnClasses attribute is present on t:dataTable

Posted by Mike Kienenberger <mk...@gmail.com>.
I've never used the css styling attributes, but it makes sense to me
that a column style would either replace or add to a table style
specification.

Perhaps you could open a Jira issue and submit a patch providing this
functionality?

On 4/18/06, Matt Hughes <mh...@chariotsolutions.com> wrote:
> If you have a dataTable as such:
>
> <t:dataTable
>     columnClasses="colClassOne, colClassTwo, colClassThree"
>     value=".." >
>
>     <t:column styleClass="editMode"></t:column>
>     <t:column styleClass="viewMode"><t:column>
> </t:dataTable>
>
>
> The rendered HTML only has the style classes specified in the
> columnClasses attribute.  Is this the desired effect?  I was not able to
> find any documentation specifying what was supposed to happen if you had
> both of them.  I believe that the styleClass attribute on the t:column
> element should be *added* not ignored.  So the resulting HTML *should*
> IMHO look like this.
>
> <table>
>     <tr>
>     <td class="colClassOne editMode"></td>
>     <td class="colClassTwo viewMode"></td>
>     <td class="colClassThree"></td>
>     </tr>
> </table>
>
> Instead of:
>
> <table>
>     <tr>
>     <td class="colClassOne"></td>
>     <td class="colClassTwo"></td>
>     <td class="colClassThree"></td>
>     </tr>
> </table>
>