myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sushma Sharma <sushma_sharm...@yahoo.co.in>
Subject Re: t:dataTable’s rowclasses displayed incorrectly
Date Mon, 15 Oct 2007 21:49:55 GMT
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.terschueren@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.terschueren@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.terschueren@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 



Mime
View raw message