-
1. Re: rich:datatable - filtering with rich:columngroup
harut Mar 15, 2010 3:43 AM (in response to dejela)Hi, put rowClasses into your dataTable and change it's value to the Constant one. In your case rowClasses="spot.statusName" has dynamic value, because "spot" is an item of the #{myBean.lspots} Collection, and it is changed after each row generation... -
2. Re: rich:datatable - filtering with rich:columngroup
dejela Mar 15, 2010 3:50 AM (in response to harut)well that's the thing.. i need the row color to be displays dynamically according to the status,
how can i do it with filtering and sorting?
-
3. Re: rich:datatable - filtering with rich:columngroup
harut Mar 15, 2010 4:07 AM (in response to dejela)you should have a String property (e.g. rowStyleClasses) in the Bean class (e.g. in myBean), and you should write a business logic functionality for that String to contain comma seperated css class names according to the current Collection for dataTable (myBean.lspots). Andt you should set rowClasses="#{myBean.rowStyleClasses}" for your dataTable, where rowStyleClasses is mentioned String property of your Bean class...
-
4. Re: rich:datatable - filtering with rich:columngroup
dejela Mar 15, 2010 4:11 AM (in response to harut)great idea!!! -
5. Re: rich:datatable - filtering with rich:columngroup
peter.bachl May 18, 2010 3:20 AM (in response to dejela)Hi,
did you get filtering in <rich:columnGroup> working?
I am trying to get this running without any success...
So, any comments on your filtering-solution would be great!
Thank you!
Peter
-
6. Re: rich:datatable - filtering with rich:columngroup
dejela May 18, 2010 3:52 AM (in response to peter.bachl)Hi!
I didn't use columngroup at the end.
Since, the pagers don't work well with grouping and filtering.
At the end i used scrollbar.
I implmented it like this:
<rich:extendedDataTable sortPriority="#{spot.startTimeForTable}"value="#{scheduleResultBean.lspotsOnDate}" var="spot" id="spots"rowClasses="#{spot.statusName}" columnClasses="schCol"rendered="#{scheduleResultBean.dateChooseHasSpots}" width="1000px"height="415px" ><rich:column id="startTime" label="Start Time"sortBy="#{spot.startTime}" filterBy="#{spot.startTimeForTable}"filterEvent="onkeyup" styleClass="schColR" style="text-align:center"><f:facet name="header"><h:outputText value="#{scheduleResultBean.colTime}" /></f:facet><h:outputText value="#{spot.startTimeForTable}"></h:outputText></rich:column></rich:extendedDataTable>where lspotsOnDate is a list of spots.
spot object has field called statusName which also represents the CSS class name (Failed, Placed)
public Collection<UsSpotsScheduleResult> getLspotsOnDate() {
return lspotsOnDate;
}
..
UsSpotsScheduleResult
public String getStatusName() {
return statusName;
}
..CSS:.Failed {background-color: #C3C3C7;}.Placed {background-color: #2D82E3;}good luck!
-
7. Re: rich:datatable - filtering with rich:columngroup
peter.bachl May 18, 2010 5:04 AM (in response to dejela)thanks for your quick answer!
since I really want to use columnGroup I have created a new thread with a short example
http://community.jboss.org/thread/152099?tstart=0
bye,
Peter