You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Anitha Suraj <as...@gmail.com> on 2006/06/22 19:40:15 UTC

Concatenate columnClasses names for dataTable

Hi,

I am trying to create a list of column styles based on the column type in a
datatable. For instance, if the column type is String, I need to left-align.
If my column type is Number, I need to right-align.
So I need to loop through all the column types and create the
comma-separated list of columnClasses like "StringCol, NumberCol, StringCol"
where StringCol and NumberCol are CSS styles. I don't want to create this in
Java code because I don't want any style information in Java Code. So I want
to do this in the JSP file where I am instantiating a dataTable.

I don't think it'll work if I combine JSTL and JSF in this case i.e use
dataList with <c:set ..> tag. I am trying to set the following:

	<t:dataTable id="summarytable"
			width="100%"
			cellpadding="2"
			cellspacing="2"
			columnClasses="#{requestScope.columnClass}" -> should return "StringCol,
NumberCol, StringCol"
...
        </t:dataTable>

Is there a work-around for this? I am using MyFaces and Tomahawk versions
1.1.1.
--
View this message in context: http://www.nabble.com/Concatenate-columnClasses-names-for-dataTable-t1831648.html#a4998235
Sent from the MyFaces - Users forum at Nabble.com.