You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Henke <h....@nowa-it.de> on 2007/10/10 14:29:58 UTC

t:dataTable’s rowclasses displayed incorrectly

I have a t:dataTable with varying rowClasses.  The datatable is combined with
a paginator. The argument for rowClasses is bound to a backing bean, which
determines the style used for a certain row. Blocks of rows are supposed to
have a different background color. This works almost fine for the first
page, except the color of the first line, which is white. On the following
pages the row color pattern of the first page is repeated including the
white row. Can anybody show me the mistake?

The datatable’s parameters:

<t:dataTable id="searchResultList" rowIndexVar="index"
		styleClass="scrollerTable" headerClass="standardTable_Header"
		footerClass="standardTable_Header"
		rowClasses="#{searchCriteriaBean.searchRowColors}" 
		var="searchItem"
		value="#{searchCriteriaBean.searchResultList}"
		rows="10"
		style="width:100%">


Thank you 
Henke

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Henke <h....@nowa-it.de>.
My problem was that I didn't just need alternating colored rows. The row's
color depends on the data it contains. But it works alright now.


Sushma Sharma wrote:
> 
> No, you don't have to specify the class for each
> column in order to get the row pattern.
> here is small example:
> 
> =========== JSF CODE ==============================
> <t:dataTable renderedIfEmpty="false" var="tp"
> value="#{tpBean.tps}" 
> 		 cellpadding="0" cellspacing="0" rowClasses="tp ,
> statusShadeTr" 
> 		 width="780" id="searchResultTable1" forceId="true">
> 
> ============= HTML OUTPUT =======================
> 
> <tr class="tp"><td>106</td><td>81068amt6</td><td>Team
> 6  - Departures</td><td>81068</td></tr>
> <tr
> class="statusShadeTr"><td>151</td><td>115156NEW</td><td>Hardware
> Asset Mgt - New</td><td>1151</td></tr>
> <tr
> class="tp"><td>201</td><td>2202RDPLY</td><td>Hardware
> Asset Mgt - Redeployed</td><td>2202</td></tr>
> <tr
> class="statusShadeTr"><td>101</td><td>31013amt1</td><td>Team
> 1  - Primary tp</td><td>31013</td></tr>
> <tr class="tp"><td>102</td><td>41024amt2</td><td>Team
> 2 - Secondary tp</td><td>41024</td></tr>
> 
> ==========================================
> 
> as you can see, I had specified two classes for rows
> and these classes are repeated alternatively when
> generating html. 
> 
> 
> --- Henke <h....@nowa-it.de> wrote:
> 
>> 
>> Thank you guys, especially Sushma, for your input.
>> It really helped me.
>> 
>> If anyone else should stumble about this preoblem,
>> here is a solution: it is
>> apparently unevitable to have rowClasses create a
>> pattern, which is
>> reproduced on every page. Therefore now every
>> <t:column> receives a style
>> class determined by a searchItem, so it looks like
>> that: <t:column
>> styleClass="#{searchItem.rowColor}">
>> 
>> 
>> 
>> Henke wrote:
>> > 
>> > I have a t:dataTable with varying rowClasses.  The
>> datatable is combined
>> > with a paginator. The argument for rowClasses is
>> bound to a backing bean,
>> > which determines the style used for a certain row.
>> Blocks of rows are
>> > supposed to have a different background color.
>> This works almost fine for
>> > the first page, except the color of the first
>> line, which is white. On the
>> > following pages the row color pattern of the first
>> page is repeated
>> > including the white row. Can anybody show me the
>> mistake?
>> > 
>> > The datatable’s parameters:
>> > 
>> > <t:dataTable id="searchResultList"
>> rowIndexVar="index"
>> > 		styleClass="scrollerTable"
>> headerClass="standardTable_Header"
>> > 		footerClass="standardTable_Header"
>> > 	
>> rowClasses="#{searchCriteriaBean.searchRowColors}" 
>> > 		var="searchItem"
>> > 		value="#{searchCriteriaBean.searchResultList}"
>> > 		rows="10"
>> > 		style="width:100%">
>> > 
>> > 
>> > Thank you 
>> > Henke
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13254518
>> Sent from the MyFaces - Users mailing list archive
>> at Nabble.com.
>> 
>> 
> 
> 
>     The word "Impossible" itself says " I m possible".
>   Sushma
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13359899
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Sushma Sharma <su...@yahoo.co.in>.
No, you don't have to specify the class for each
column in order to get the row pattern.
here is small example:

=========== JSF CODE ==============================
<t:dataTable renderedIfEmpty="false" var="tp"
value="#{tpBean.tps}" 
		 cellpadding="0" cellspacing="0" rowClasses="tp ,
statusShadeTr" 
		 width="780" id="searchResultTable1" forceId="true">

============= HTML OUTPUT =======================

<tr class="tp"><td>106</td><td>81068amt6</td><td>Team
6  - Departures</td><td>81068</td></tr>
<tr
class="statusShadeTr"><td>151</td><td>115156NEW</td><td>Hardware
Asset Mgt - New</td><td>1151</td></tr>
<tr
class="tp"><td>201</td><td>2202RDPLY</td><td>Hardware
Asset Mgt - Redeployed</td><td>2202</td></tr>
<tr
class="statusShadeTr"><td>101</td><td>31013amt1</td><td>Team
1  - Primary tp</td><td>31013</td></tr>
<tr class="tp"><td>102</td><td>41024amt2</td><td>Team
2 - Secondary tp</td><td>41024</td></tr>

==========================================

as you can see, I had specified two classes for rows
and these classes are repeated alternatively when
generating html. 


--- Henke <h....@nowa-it.de> wrote:

> 
> Thank you guys, especially Sushma, for your input.
> It really helped me.
> 
> If anyone else should stumble about this preoblem,
> here is a solution: it is
> apparently unevitable to have rowClasses create a
> pattern, which is
> reproduced on every page. Therefore now every
> <t:column> receives a style
> class determined by a searchItem, so it looks like
> that: <t:column
> styleClass="#{searchItem.rowColor}">
> 
> 
> 
> Henke wrote:
> > 
> > I have a t:dataTable with varying rowClasses.  The
> datatable is combined
> > with a paginator. The argument for rowClasses is
> bound to a backing bean,
> > which determines the style used for a certain row.
> Blocks of rows are
> > supposed to have a different background color.
> This works almost fine for
> > the first page, except the color of the first
> line, which is white. On the
> > following pages the row color pattern of the first
> page is repeated
> > including the white row. Can anybody show me the
> mistake?
> > 
> > The datatable’s parameters:
> > 
> > <t:dataTable id="searchResultList"
> rowIndexVar="index"
> > 		styleClass="scrollerTable"
> headerClass="standardTable_Header"
> > 		footerClass="standardTable_Header"
> > 	
> rowClasses="#{searchCriteriaBean.searchRowColors}" 
> > 		var="searchItem"
> > 		value="#{searchCriteriaBean.searchResultList}"
> > 		rows="10"
> > 		style="width:100%">
> > 
> > 
> > Thank you 
> > Henke
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13254518
> Sent from the MyFaces - Users mailing list archive
> at Nabble.com.
> 
> 


    The word "Impossible" itself says " I m possible".
  Sushma




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Henke <h....@nowa-it.de>.
Thank you guys, especially Sushma, for your input. It really helped me.

If anyone else should stumble about this preoblem, here is a solution: it is
apparently unevitable to have rowClasses create a pattern, which is
reproduced on every page. Therefore now every <t:column> receives a style
class determined by a searchItem, so it looks like that: <t:column
styleClass="#{searchItem.rowColor}">



Henke wrote:
> 
> I have a t:dataTable with varying rowClasses.  The datatable is combined
> with a paginator. The argument for rowClasses is bound to a backing bean,
> which determines the style used for a certain row. Blocks of rows are
> supposed to have a different background color. This works almost fine for
> the first page, except the color of the first line, which is white. On the
> following pages the row color pattern of the first page is repeated
> including the white row. Can anybody show me the mistake?
> 
> The datatable’s parameters:
> 
> <t:dataTable id="searchResultList" rowIndexVar="index"
> 		styleClass="scrollerTable" headerClass="standardTable_Header"
> 		footerClass="standardTable_Header"
> 		rowClasses="#{searchCriteriaBean.searchRowColors}" 
> 		var="searchItem"
> 		value="#{searchCriteriaBean.searchResultList}"
> 		rows="10"
> 		style="width:100%">
> 
> 
> Thank you 
> Henke
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13254518
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Sushma Sharma <su...@yahoo.co.in>.
thats ok. but, There might be a small problem. Suppose
your list contains searchTable_Row1, row2, row3. 
So, when you do 
rowClasses="#{searchCriteriaBean.searchRowColors}"

 the list will be converted to String like this
"[searchTable_Row1, row2, row3]", i.e. first row class
will be [searchTable_Row1, notice the "[" in front of
the class name? that is the problem here. 
check your page source and look for the class name of
the first row of the table.

--- Henke <h....@nowa-it.de> wrote:

> 
> It's a list consisting of Strings. The Strings are
> css-arguments, which are
> interpreted correctly for the first page. 
> 
> 
> 
> Sushma Sharma wrote:
> > 
> > is searchRowColors a list ? I am really not sure
> if
> > you can use List to supply rowClasses. I think it
> must
> > be a String.
> > 
> > --- Henke <h....@nowa-it.de> wrote:
> > 
> >> 
> >> This is the method, which adds the corresponding
> >> style class. The first
> >> string isn't "" but one of the two desired
> values.
> >> 
> >> 	public void
> >>
> determineSearchRowColors(List<SearchResultListItem>
> >> searchResultList) {
> >> 		boolean changeRowColor = false;
> >> 		
> >> 		for (SearchResultListItem searchResultListItem
> :
> >> searchResultList) {
> >> 			if
> >> (!searchResultListItem.getSearchId().equals(""))
> {
> >> 				changeRowColor = !changeRowColor;
> >> 			}
> >> 			if (changeRowColor) {
> >> 				searchRowColors.add("searchTable_Row1");
> >> 			} else {
> >> 				searchRowColors.add("searchTable_Row2");
> >> 			}
> >> 		}
> >> 
> >> 	}
> >> 
> >> 
> >> Sushma Sharma wrote:
> >> > 
> >> > One possibility is that the first token in the
> >> string of rowClasses is "",
> >> > i.e. empty string.
> >> >   can you show how are you getting the value of
> >> > "searchCriteriaBean.searchRowColors"?
> >> >   may be its value is something like this
> >> "",aClass, bClass, cClass.. 
> >> > 
> >> > Henke <h....@nowa-it.de> wrote:
> >> >   
> >> > I have a t:dataTable with varying rowClasses.
> The
> >> datatable is combined
> >> > with
> >> > a paginator. The argument for rowClasses is
> bound
> >> to a backing bean, which
> >> > determines the style used for a certain row.
> >> Blocks of rows are supposed
> >> > to
> >> > have a different background color. This works
> >> almost fine for the first
> >> > page, except the color of the first line, which
> is
> >> white. On the following
> >> > pages the row color pattern of the first page
> is
> >> repeated including the
> >> > white row. Can anybody show me the mistake?
> >> > 
> >> > The datatable’s parameters:
> >> > 
> >> > styleClass="scrollerTable"
> >> headerClass="standardTable_Header"
> >> > footerClass="standardTable_Header"
> >> >
> rowClasses="#{searchCriteriaBean.searchRowColors}"
> >> 
> >> > var="searchItem"
> >> > value="#{searchCriteriaBean.searchResultList}"
> >> > rows="10"
> >> > style="width:100%">
> >> > 
> >> > 
> >> > Thank you 
> >> > Henke
> >> > 
> >> > -- 
> >> > View this message in context:
> >> >
> >>
> >
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
> >> > Sent from the MyFaces - Users mailing list
> archive
> >> at Nabble.com.
> >> > 
> >> > 
> >> > 
> >> > 
> >> >     The word "Impossible" itself says " I m
> >> possible".
> >> >   Sushma
> >> > 
> >> > 
> >> > 
> >> >        
> >> > ---------------------------------
> >> > Take the Internet to Go: Yahoo!Go puts the
> >> Internet in your pocket: mail,
> >> > news, photos & more. 
> >> > 
> >> 
> >> -- 
> >> View this message in context:
> >>
> >
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
> >> Sent from the MyFaces - Users mailing list
> archive
> >> at Nabble.com.
> >> 
> >> 
> > 
> > 
> >     The word "Impossible" itself says " I m
> possible".
> >   Sushma
> > 
> > 
> > 
> > 
> > 
> >      
> >
>
____________________________________________________________________________________
> > Catch up on fall's hot new shows on Yahoo! TV.
> Watch previews, get
> > listings, and more!
> > http://tv.yahoo.com/collections/3658 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13208371
> Sent from the MyFaces - Users mailing list archive
> at Nabble.com.
> 
> 


    The word "Impossible" itself says " I m possible".
  Sushma





      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



Re: t:dataTable’s rowclasses displayed incorrectly

Posted by David Brainard <sd...@gmail.com>.
Hi henke,

Eventhough there is a bug in rendering the style classes there will be a 
problem if you try to pass a list of column classes because while 
resolving your value binding it does a tostring of the object obtained 
from the value binding so you will get an error coz toString of a list 
will give sme thing like this
[searchTable_Row1,searchTable_Row2] where else the expected value is 
just  "searchTable_Row1,searchTable_Row2".

so try constructing a string rather than a list... i hope this works...

Regards
David Brainard Sounthiraraj

Henke wrote:
> It's a list consisting of Strings. The Strings are css-arguments, which are
> interpreted correctly for the first page. 
>
>
>
> Sushma Sharma wrote:
>   
>> is searchRowColors a list ? I am really not sure if
>> you can use List to supply rowClasses. I think it must
>> be a String.
>>
>> --- Henke <h....@nowa-it.de> wrote:
>>
>>     
>>> This is the method, which adds the corresponding
>>> style class. The first
>>> string isn't "" but one of the two desired values.
>>>
>>> 	public void
>>> determineSearchRowColors(List<SearchResultListItem>
>>> searchResultList) {
>>> 		boolean changeRowColor = false;
>>> 		
>>> 		for (SearchResultListItem searchResultListItem :
>>> searchResultList) {
>>> 			if
>>> (!searchResultListItem.getSearchId().equals("")) {
>>> 				changeRowColor = !changeRowColor;
>>> 			}
>>> 			if (changeRowColor) {
>>> 				searchRowColors.add("searchTable_Row1");
>>> 			} else {
>>> 				searchRowColors.add("searchTable_Row2");
>>> 			}
>>> 		}
>>>
>>> 	}
>>>
>>>
>>> Sushma Sharma wrote:
>>>       
>>>> One possibility is that the first token in the
>>>>         
>>> string of rowClasses is "",
>>>       
>>>> i.e. empty string.
>>>>   can you show how are you getting the value of
>>>> "searchCriteriaBean.searchRowColors"?
>>>>   may be its value is something like this
>>>>         
>>> "",aClass, bClass, cClass.. 
>>>       
>>>> Henke <h....@nowa-it.de> wrote:
>>>>   
>>>> I have a t:dataTable with varying rowClasses. The
>>>>         
>>> datatable is combined
>>>       
>>>> with
>>>> a paginator. The argument for rowClasses is bound
>>>>         
>>> to a backing bean, which
>>>       
>>>> determines the style used for a certain row.
>>>>         
>>> Blocks of rows are supposed
>>>       
>>>> to
>>>> have a different background color. This works
>>>>         
>>> almost fine for the first
>>>       
>>>> page, except the color of the first line, which is
>>>>         
>>> white. On the following
>>>       
>>>> pages the row color pattern of the first page is
>>>>         
>>> repeated including the
>>>       
>>>> white row. Can anybody show me the mistake?
>>>>
>>>> The datatable’s parameters:
>>>>
>>>> styleClass="scrollerTable"
>>>>         
>>> headerClass="standardTable_Header"
>>>       
>>>> footerClass="standardTable_Header"
>>>> rowClasses="#{searchCriteriaBean.searchRowColors}"
>>>>         
>>>> var="searchItem"
>>>> value="#{searchCriteriaBean.searchResultList}"
>>>> rows="10"
>>>> style="width:100%">
>>>>
>>>>
>>>> Thank you 
>>>> Henke
>>>>
>>>> -- 
>>>> View this message in context:
>>>>
>>>>         
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
>>     
>>>> Sent from the MyFaces - Users mailing list archive
>>>>         
>>> at Nabble.com.
>>>       
>>>>
>>>>
>>>>     The word "Impossible" itself says " I m
>>>>         
>>> possible".
>>>       
>>>>   Sushma
>>>>
>>>>
>>>>
>>>>        
>>>> ---------------------------------
>>>> Take the Internet to Go: Yahoo!Go puts the
>>>>         
>>> Internet in your pocket: mail,
>>>       
>>>> news, photos & more. 
>>>>
>>>>         
>>> -- 
>>> View this message in context:
>>>
>>>       
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
>>     
>>> Sent from the MyFaces - Users mailing list archive
>>> at Nabble.com.
>>>
>>>
>>>       
>>     The word "Impossible" itself says " I m possible".
>>   Sushma
>>
>>
>>
>>
>>
>>      
>> ____________________________________________________________________________________
>> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
>> listings, and more!
>> http://tv.yahoo.com/collections/3658 
>>
>>
>>     
>
>   


Re: t:dataTable rowclasses displayed incorrectly

Posted by Henke <h....@nowa-it.de>.
Using a String instead of a list took care of the first line not displaying
any style. I don't use t:columns and columnClasses, though. Below is a
screenshot of the rendered datatable. I think what happens is that the
number of rows specified in the header of the dataTable determines how many
elements of the string searchRowColors and uses them as a pattern for all
result pages. Any ideas?

http://www.nabble.com/file/p13231931/datatable1.jpg 



Henke wrote:
> 
> It's a list consisting of Strings. The Strings are css-arguments, which
> are interpreted correctly for the first page. 
> 
> 
> 
> Sushma Sharma wrote:
>> 
>> is searchRowColors a list ? I am really not sure if
>> you can use List to supply rowClasses. I think it must
>> be a String.
>> 
>> --- Henke <h....@nowa-it.de> wrote:
>> 
>>> 
>>> This is the method, which adds the corresponding
>>> style class. The first
>>> string isn't "" but one of the two desired values.
>>> 
>>> 	public void
>>> determineSearchRowColors(List<SearchResultListItem>
>>> searchResultList) {
>>> 		boolean changeRowColor = false;
>>> 		
>>> 		for (SearchResultListItem searchResultListItem :
>>> searchResultList) {
>>> 			if
>>> (!searchResultListItem.getSearchId().equals("")) {
>>> 				changeRowColor = !changeRowColor;
>>> 			}
>>> 			if (changeRowColor) {
>>> 				searchRowColors.add("searchTable_Row1");
>>> 			} else {
>>> 				searchRowColors.add("searchTable_Row2");
>>> 			}
>>> 		}
>>> 
>>> 	}
>>> 
>>> 
>>> Sushma Sharma wrote:
>>> > 
>>> > One possibility is that the first token in the
>>> string of rowClasses is "",
>>> > i.e. empty string.
>>> >   can you show how are you getting the value of
>>> > "searchCriteriaBean.searchRowColors"?
>>> >   may be its value is something like this
>>> "",aClass, bClass, cClass.. 
>>> > 
>>> > Henke <h....@nowa-it.de> wrote:
>>> >   
>>> > I have a t:dataTable with varying rowClasses. The
>>> datatable is combined
>>> > with
>>> > a paginator. The argument for rowClasses is bound
>>> to a backing bean, which
>>> > determines the style used for a certain row.
>>> Blocks of rows are supposed
>>> > to
>>> > have a different background color. This works
>>> almost fine for the first
>>> > page, except the color of the first line, which is
>>> white. On the following
>>> > pages the row color pattern of the first page is
>>> repeated including the
>>> > white row. Can anybody show me the mistake?
>>> > 
>>> > The datatable’s parameters:
>>> > 
>>> > styleClass="scrollerTable"
>>> headerClass="standardTable_Header"
>>> > footerClass="standardTable_Header"
>>> > rowClasses="#{searchCriteriaBean.searchRowColors}"
>>> 
>>> > var="searchItem"
>>> > value="#{searchCriteriaBean.searchResultList}"
>>> > rows="10"
>>> > style="width:100%">
>>> > 
>>> > 
>>> > Thank you 
>>> > Henke
>>> > 
>>> > -- 
>>> > View this message in context:
>>> >
>>>
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
>>> > Sent from the MyFaces - Users mailing list archive
>>> at Nabble.com.
>>> > 
>>> > 
>>> > 
>>> > 
>>> >     The word "Impossible" itself says " I m
>>> possible".
>>> >   Sushma
>>> > 
>>> > 
>>> > 
>>> >        
>>> > ---------------------------------
>>> > Take the Internet to Go: Yahoo!Go puts the
>>> Internet in your pocket: mail,
>>> > news, photos & more. 
>>> > 
>>> 
>>> -- 
>>> View this message in context:
>>>
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
>>> Sent from the MyFaces - Users mailing list archive
>>> at Nabble.com.
>>> 
>>> 
>> 
>> 
>>     The word "Impossible" itself says " I m possible".
>>   Sushma
>> 
>> 
>> 
>> 
>> 
>>      
>> ____________________________________________________________________________________
>> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
>> listings, and more!
>> http://tv.yahoo.com/collections/3658 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13231931
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by David Brainard <sd...@gmail.com>.
hi henke,

I assume that you are using *t:columns *for ur dynamic columns 
generation... There is a problem in t:columns regarding styleclass 
rendering(bug id:TOMAHAWK1116)....

I have fixed this issue and attached a new renderer in jira...pls get 
the renderers and check it out..  :-)     ..i hope this will solve ur 
problem... :-D

regards,
David Brainard Sounthiraraj.

Henke wrote:
> It's a list consisting of Strings. The Strings are css-arguments, which are
> interpreted correctly for the first page. 
>
>
>
> Sushma Sharma wrote:
>   
>> is searchRowColors a list ? I am really not sure if
>> you can use List to supply rowClasses. I think it must
>> be a String.
>>
>> --- Henke <h....@nowa-it.de> wrote:
>>
>>     
>>> This is the method, which adds the corresponding
>>> style class. The first
>>> string isn't "" but one of the two desired values.
>>>
>>> 	public void
>>> determineSearchRowColors(List<SearchResultListItem>
>>> searchResultList) {
>>> 		boolean changeRowColor = false;
>>> 		
>>> 		for (SearchResultListItem searchResultListItem :
>>> searchResultList) {
>>> 			if
>>> (!searchResultListItem.getSearchId().equals("")) {
>>> 				changeRowColor = !changeRowColor;
>>> 			}
>>> 			if (changeRowColor) {
>>> 				searchRowColors.add("searchTable_Row1");
>>> 			} else {
>>> 				searchRowColors.add("searchTable_Row2");
>>> 			}
>>> 		}
>>>
>>> 	}
>>>
>>>
>>> Sushma Sharma wrote:
>>>       
>>>> One possibility is that the first token in the
>>>>         
>>> string of rowClasses is "",
>>>       
>>>> i.e. empty string.
>>>>   can you show how are you getting the value of
>>>> "searchCriteriaBean.searchRowColors"?
>>>>   may be its value is something like this
>>>>         
>>> "",aClass, bClass, cClass.. 
>>>       
>>>> Henke <h....@nowa-it.de> wrote:
>>>>   
>>>> I have a t:dataTable with varying rowClasses. The
>>>>         
>>> datatable is combined
>>>       
>>>> with
>>>> a paginator. The argument for rowClasses is bound
>>>>         
>>> to a backing bean, which
>>>       
>>>> determines the style used for a certain row.
>>>>         
>>> Blocks of rows are supposed
>>>       
>>>> to
>>>> have a different background color. This works
>>>>         
>>> almost fine for the first
>>>       
>>>> page, except the color of the first line, which is
>>>>         
>>> white. On the following
>>>       
>>>> pages the row color pattern of the first page is
>>>>         
>>> repeated including the
>>>       
>>>> white row. Can anybody show me the mistake?
>>>>
>>>> The datatable’s parameters:
>>>>
>>>> styleClass="scrollerTable"
>>>>         
>>> headerClass="standardTable_Header"
>>>       
>>>> footerClass="standardTable_Header"
>>>> rowClasses="#{searchCriteriaBean.searchRowColors}"
>>>>         
>>>> var="searchItem"
>>>> value="#{searchCriteriaBean.searchResultList}"
>>>> rows="10"
>>>> style="width:100%">
>>>>
>>>>
>>>> Thank you 
>>>> Henke
>>>>
>>>> -- 
>>>> View this message in context:
>>>>
>>>>         
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
>>     
>>>> Sent from the MyFaces - Users mailing list archive
>>>>         
>>> at Nabble.com.
>>>       
>>>>
>>>>
>>>>     The word "Impossible" itself says " I m
>>>>         
>>> possible".
>>>       
>>>>   Sushma
>>>>
>>>>
>>>>
>>>>        
>>>> ---------------------------------
>>>> Take the Internet to Go: Yahoo!Go puts the
>>>>         
>>> Internet in your pocket: mail,
>>>       
>>>> news, photos & more. 
>>>>
>>>>         
>>> -- 
>>> View this message in context:
>>>
>>>       
>> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
>>     
>>> Sent from the MyFaces - Users mailing list archive
>>> at Nabble.com.
>>>
>>>
>>>       
>>     The word "Impossible" itself says " I m possible".
>>   Sushma
>>
>>
>>
>>
>>
>>      
>> ____________________________________________________________________________________
>> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
>> listings, and more!
>> http://tv.yahoo.com/collections/3658 
>>
>>
>>     
>
>   


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Henke <h....@nowa-it.de>.
It's a list consisting of Strings. The Strings are css-arguments, which are
interpreted correctly for the first page. 



Sushma Sharma wrote:
> 
> is searchRowColors a list ? I am really not sure if
> you can use List to supply rowClasses. I think it must
> be a String.
> 
> --- Henke <h....@nowa-it.de> wrote:
> 
>> 
>> This is the method, which adds the corresponding
>> style class. The first
>> string isn't "" but one of the two desired values.
>> 
>> 	public void
>> determineSearchRowColors(List<SearchResultListItem>
>> searchResultList) {
>> 		boolean changeRowColor = false;
>> 		
>> 		for (SearchResultListItem searchResultListItem :
>> searchResultList) {
>> 			if
>> (!searchResultListItem.getSearchId().equals("")) {
>> 				changeRowColor = !changeRowColor;
>> 			}
>> 			if (changeRowColor) {
>> 				searchRowColors.add("searchTable_Row1");
>> 			} else {
>> 				searchRowColors.add("searchTable_Row2");
>> 			}
>> 		}
>> 
>> 	}
>> 
>> 
>> Sushma Sharma wrote:
>> > 
>> > One possibility is that the first token in the
>> string of rowClasses is "",
>> > i.e. empty string.
>> >   can you show how are you getting the value of
>> > "searchCriteriaBean.searchRowColors"?
>> >   may be its value is something like this
>> "",aClass, bClass, cClass.. 
>> > 
>> > Henke <h....@nowa-it.de> wrote:
>> >   
>> > I have a t:dataTable with varying rowClasses. The
>> datatable is combined
>> > with
>> > a paginator. The argument for rowClasses is bound
>> to a backing bean, which
>> > determines the style used for a certain row.
>> Blocks of rows are supposed
>> > to
>> > have a different background color. This works
>> almost fine for the first
>> > page, except the color of the first line, which is
>> white. On the following
>> > pages the row color pattern of the first page is
>> repeated including the
>> > white row. Can anybody show me the mistake?
>> > 
>> > The datatable’s parameters:
>> > 
>> > styleClass="scrollerTable"
>> headerClass="standardTable_Header"
>> > footerClass="standardTable_Header"
>> > rowClasses="#{searchCriteriaBean.searchRowColors}"
>> 
>> > var="searchItem"
>> > value="#{searchCriteriaBean.searchResultList}"
>> > rows="10"
>> > style="width:100%">
>> > 
>> > 
>> > Thank you 
>> > Henke
>> > 
>> > -- 
>> > View this message in context:
>> >
>>
> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
>> > Sent from the MyFaces - Users mailing list archive
>> at Nabble.com.
>> > 
>> > 
>> > 
>> > 
>> >     The word "Impossible" itself says " I m
>> possible".
>> >   Sushma
>> > 
>> > 
>> > 
>> >        
>> > ---------------------------------
>> > Take the Internet to Go: Yahoo!Go puts the
>> Internet in your pocket: mail,
>> > news, photos & more. 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
>> Sent from the MyFaces - Users mailing list archive
>> at Nabble.com.
>> 
>> 
> 
> 
>     The word "Impossible" itself says " I m possible".
>   Sushma
> 
> 
> 
> 
> 
>      
> ____________________________________________________________________________________
> Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get
> listings, and more!
> http://tv.yahoo.com/collections/3658 
> 
> 

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13208371
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Sushma Sharma <su...@yahoo.co.in>.
is searchRowColors a list ? I am really not sure if
you can use List to supply rowClasses. I think it must
be a String.

--- Henke <h....@nowa-it.de> wrote:

> 
> This is the method, which adds the corresponding
> style class. The first
> string isn't "" but one of the two desired values.
> 
> 	public void
> determineSearchRowColors(List<SearchResultListItem>
> searchResultList) {
> 		boolean changeRowColor = false;
> 		
> 		for (SearchResultListItem searchResultListItem :
> searchResultList) {
> 			if
> (!searchResultListItem.getSearchId().equals("")) {
> 				changeRowColor = !changeRowColor;
> 			}
> 			if (changeRowColor) {
> 				searchRowColors.add("searchTable_Row1");
> 			} else {
> 				searchRowColors.add("searchTable_Row2");
> 			}
> 		}
> 
> 	}
> 
> 
> Sushma Sharma wrote:
> > 
> > One possibility is that the first token in the
> string of rowClasses is "",
> > i.e. empty string.
> >   can you show how are you getting the value of
> > "searchCriteriaBean.searchRowColors"?
> >   may be its value is something like this
> "",aClass, bClass, cClass.. 
> > 
> > Henke <h....@nowa-it.de> wrote:
> >   
> > I have a t:dataTable with varying rowClasses. The
> datatable is combined
> > with
> > a paginator. The argument for rowClasses is bound
> to a backing bean, which
> > determines the style used for a certain row.
> Blocks of rows are supposed
> > to
> > have a different background color. This works
> almost fine for the first
> > page, except the color of the first line, which is
> white. On the following
> > pages the row color pattern of the first page is
> repeated including the
> > white row. Can anybody show me the mistake?
> > 
> > The datatable’s parameters:
> > 
> > styleClass="scrollerTable"
> headerClass="standardTable_Header"
> > footerClass="standardTable_Header"
> > rowClasses="#{searchCriteriaBean.searchRowColors}"
> 
> > var="searchItem"
> > value="#{searchCriteriaBean.searchResultList}"
> > rows="10"
> > style="width:100%">
> > 
> > 
> > Thank you 
> > Henke
> > 
> > -- 
> > View this message in context:
> >
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
> > Sent from the MyFaces - Users mailing list archive
> at Nabble.com.
> > 
> > 
> > 
> > 
> >     The word "Impossible" itself says " I m
> possible".
> >   Sushma
> > 
> > 
> > 
> >        
> > ---------------------------------
> > Take the Internet to Go: Yahoo!Go puts the
> Internet in your pocket: mail,
> > news, photos & more. 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
> Sent from the MyFaces - Users mailing list archive
> at Nabble.com.
> 
> 


    The word "Impossible" itself says " I m possible".
  Sushma





      ____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
http://tv.yahoo.com/collections/3658 

Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Henke <h....@nowa-it.de>.
This is the method, which adds the corresponding style class. The first
string isn't "" but one of the two desired values.

	public void determineSearchRowColors(List<SearchResultListItem>
searchResultList) {
		boolean changeRowColor = false;
		
		for (SearchResultListItem searchResultListItem : searchResultList) {
			if (!searchResultListItem.getSearchId().equals("")) {
				changeRowColor = !changeRowColor;
			}
			if (changeRowColor) {
				searchRowColors.add("searchTable_Row1");
			} else {
				searchRowColors.add("searchTable_Row2");
			}
		}

	}


Sushma Sharma wrote:
> 
> One possibility is that the first token in the string of rowClasses is "",
> i.e. empty string.
>   can you show how are you getting the value of
> "searchCriteriaBean.searchRowColors"?
>   may be its value is something like this "",aClass, bClass, cClass.. 
> 
> Henke <h....@nowa-it.de> wrote:
>   
> I have a t:dataTable with varying rowClasses. The datatable is combined
> with
> a paginator. The argument for rowClasses is bound to a backing bean, which
> determines the style used for a certain row. Blocks of rows are supposed
> to
> have a different background color. This works almost fine for the first
> page, except the color of the first line, which is white. On the following
> pages the row color pattern of the first page is repeated including the
> white row. Can anybody show me the mistake?
> 
> The datatable’s parameters:
> 
> styleClass="scrollerTable" headerClass="standardTable_Header"
> footerClass="standardTable_Header"
> rowClasses="#{searchCriteriaBean.searchRowColors}" 
> var="searchItem"
> value="#{searchCriteriaBean.searchResultList}"
> rows="10"
> style="width:100%">
> 
> 
> Thank you 
> Henke
> 
> -- 
> View this message in context:
> http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 
> 
>     The word "Impossible" itself says " I m possible".
>   Sushma
> 
> 
> 
>        
> ---------------------------------
> Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
> news, photos & more. 
> 

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13135409
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:dataTable’s rowclasses displayed incorrectly

Posted by Sushma Sharma <su...@yahoo.co.in>.
One possibility is that the first token in the string of rowClasses is "", i.e. empty string.
  can you show how are you getting the value of "searchCriteriaBean.searchRowColors"?
  may be its value is something like this "",aClass, bClass, cClass.. 

Henke <h....@nowa-it.de> wrote:
  
I have a t:dataTable with varying rowClasses. The datatable is combined with
a paginator. The argument for rowClasses is bound to a backing bean, which
determines the style used for a certain row. Blocks of rows are supposed to
have a different background color. This works almost fine for the first
page, except the color of the first line, which is white. On the following
pages the row color pattern of the first page is repeated including the
white row. Can anybody show me the mistake?

The datatable’s parameters:

styleClass="scrollerTable" headerClass="standardTable_Header"
footerClass="standardTable_Header"
rowClasses="#{searchCriteriaBean.searchRowColors}" 
var="searchItem"
value="#{searchCriteriaBean.searchResultList}"
rows="10"
style="width:100%">


Thank you 
Henke

-- 
View this message in context: http://www.nabble.com/t%3AdataTable%E2%80%99s-rowclasses-displayed-incorrectly-tf4600440.html#a13134708
Sent from the MyFaces - Users mailing list archive at Nabble.com.




    The word "Impossible" itself says " I m possible".
  Sushma



       
---------------------------------
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more.