Hello there! We have a team developing a system using JSF in my company. I'm not a JSF person (I'm involved with Tapestry, but please I'm not here to compare, judge or anything, just seeking help)
So the team came to me because they're facing a problem.
We have a master-detail form, where we list the items using a dataTable and we have basic Crud operations as commandLinks.
Our problem is, when the user selects items using the selectBooleanCheckBox and clicks on the remove button, when we retreive the bounded variable it does not has the objects with their boolean properties modified hence we can not change the original list.
I don't know anything about JSF, but I guess this is a simple problem our developers are facing, if someone care to help me out here:
<h:panelGrid columns="3">
<h:commandButton id="novo" action="">
image="resources/imagens/bt-novo.gif"
immediate="true"/>
<h:commandButton id="SalvarEnviar"
image="resources/imagens/bt-salvar-enviar-convite.gif"
action="" />
<h:commandButton id="ApagarSelecionados"
image="resources/imagens/bt-apagar-selecionados.gif"
action="" immediate="true"/>
</h:panelGrid>
<t:dataTable id="listaEventos" value="#{manterEvento.listaEventos}"
binding="#{manterEvento.listaUIData}"
var="evento" rows="4" width="100%" headerClass="cabecalho-tabela"
footerClass="rodape-tabela">
<t:column>
<f:facet name="header">
<t:selectBooleanCheckbox 'form')" />
</f:facet>
<t:selectBooleanCheckbox value="#{evento.selecionado}"/>
</t:column>
The problem happens when the user clicks on the "ApagarSelecionados" commandButton, our managed bean:
private EventoService eventoService;
private UsuarioService usuarioService;
private Evento evento;
private List listaEventos;
private UIData listaUIData;
//getters and setters
public String excluir() {
List l = (List)listaUIData.getValue();
eventoService.excluirEventos(l);
return null;
}
problem is that the excluirEventos methods, checks each Evento and see if selecionado is set to true, case it is, the event is removed from database, but as I said, no value is being changed from the list.
Best Regards
Title: Help with t:dataTable t:selectBooleanCheckBox
- Help with t:dataTable t:selectBooleanCheckBox Vinicius Carvalho
- Re: Help with t:dataTable t:selectBooleanCheckBox Andrew Robinson

