Hello I'm developing a Web Application using RichFaces 3. I have a rich:dataTable
with individual rich:column
. One of these columns has a Date
value and there is this requirement where if the date is the same on consecutive rows the value has to be shown only on the first row, subsequent rows with same value will show nothing. So I need to save the date value for comparison on subsequent rows. Does anybody know how to do this with richFaces?
Asked
Active
Viewed 133 times
1

sarnold
- 102,305
- 22
- 181
- 238

user1236348
- 11
- 2
-
@Luiggi Mendoza: please note that we [remove thanks and greetings from posts](http://meta.stackexchange.com/questions/2950/should-hi-thanks-taglines-and-salutations-be-removed-from-posts) when editing -- please don't add them. :) – sarnold Feb 28 '12 at 00:38
-
@sarnold ok I got it and will take into account for next edits / answers. – Luiggi Mendoza Feb 28 '12 at 00:40
1 Answers
0
Well, there's a brute force which works: call a method of a bean (which I assume you have) which will tell if you need the date (alternatively, what to display). Something like:
<rich:dataTable value="#{yourBean.items}" var="item">
...
<rich:column>
<h:outputText value="#{item.date}" rendered="#{yourBean.isDateNeeded(item.date)}"/>
</rich:column>
...
</rich:dataTable>
And in the bean just keep a list of dates which were already shown or alike.
P.S.: There's actually number of ways to achieve the goal even without rich faces, js function for example.

Denys S.
- 6,358
- 12
- 43
- 65