Problem
When creating a dataTable using Bootfaces, I can bring all items of my DB but I need to bring just the ones which field equals a specific number. ¿How can I do that?
Example
Evento (Id, nombre, categoria)
- Id Nombre Categoria
- 1 aaaa 1
- 2 bbbb 2
- 3 cccc 2
dataTable only brings the first one, Id 1.
Code
<b:dataTable value="#{eventoController.items}" var="item" styleClass="list" scroll-x="true">
<h:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListEventoTitle_idEvento}"/>
</f:facet>
<h:outputText value="#{item.idEvento}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListEventoTitle_nombre}"/>
</f:facet>
<h:outputText value="#{item.nombre}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{bundle.ListEventoTitle_idCategoria}"/>
</f:facet>
<h:outputText value="#{item.idCategoria}"/>
</h:column>
</b:dataTable>