2
Hello
I have a screen where I list some records through the datatable (primefaces)
1) In my Bean I have two lists one that I feed with the records returned from the bank and the other that will be used by datatable Selection to store the selected items on the screen
@Getter @Setter
private List<RegistrosDTO> listaRegistros;
@Getter @Setter
private List<RegistrosDTO> listaRegistrosSelecionados;
In a second screen I will display the ids of the selected items on the previous screen, for this I am using the repeat function
<ui:repeat value="#{meuBBean.listaRegistrosSelecionados}"
var="registrosSelecionados"
varStatus="status">
<h:panelGroup>
<h:outputText
value="#{registro.id}" />
</h:panelGroup>
</ui:repeat>
The problem here is that you are only displaying the first item in the list, for example:
Selected Records on the first screen: 100, 101
Records displayed on the second screen: 100
2) In addition to displaying the ids of the records that are within the repeat loop, I need the other attributes but those outside the repeat block because they are the same for all ex records.:
var="registrationSelections" varStatus="status">
<h:panelGroup>
<h:outputText value="#{registrosSelecionados.id}" />
</h:panelGroup>
</ui:repeat>
</h:panelGrid>
<h:panelGroup>
<h:outputText value="#{registrosSelecionados.nome}" />
</h:panelGroup>
The problem here is that I can’t access var=registrationsSelected outside the repeat block, I tried using the datagrid component to have a var visible inside and outside the repeat, but also failed.
Any ideas to help me with this ?
Thanks in advance.