Good evening, I have the following problem ... at first it seems kind of silly, but honestly I can not get out of it
I want to create a table where the columns are SUNDAY, MONDAY, THIRD, FOURTH, FIFTH, SIXTH, SATURDAY respectively ... and in those columns the data is shown, these data have as attribute the day of the week in question, what would be the best way then to make them appear in the table in the correct column ...
<p:dataTable id="tbl"
value="#{bean.registros}"
var="registro" emptyMessage="Nenhum registro">
<p:column headerText="DOMINGO">
</p:column>
<p:column headerText="TERÇA-FEIRA">
</p:column>
<p:column headerText="QUARTA-FEIRA">
</p:column>
e assim vai...
See, each record contained in the "records" list has a call called day, which is an enum with the respective day of the week, persists, edit etc everything is working normally, the problem is that I do not know how to make the records that contain day = MONDAY only appear in the correct column ...
In other words I have a list of objects to be shown in a data table where in each column must be listed objects that have an attribute x (an enum that represents the day of the week)
I tried to make a logic with the rendered, but besides finding that it was too much "gambiarra", it was not good, causing several other problems ...
Someone with some good ideas?