Tenho um scrollableDataTable com algumas linhas e colunas.
Ao clicar em uma determinada linha, eu seto os meu inputText’s e comboBox.
Esse é o método:
public void selecionar() {
if (!getLista().isEmpty()){
Iterator<Object> iterator = getTblLista().getSelection().getKeys();
if (iterator.hasNext()){
SimpleRowKey key = (SimpleRowKey) iterator.next();
setListaBean(getLista().get(key.intValue()));
setCbxLocal(getListaBean().getBloco());
setCbxSetor(getListaBean().getSetor());
}
}
}
ScrollableDataTable
<a4j:support action="#{ListaMB.selecionar}"
event="onselectionchange"
reRender="tblLista, iptColaborador, cbxLocal, iptRamal, iptTelefone, iptEmail, cbxSetor"
oncomplete="document.getElementById('iptNome').focus();" />
Até ai tudo bem, funcionou blz!
[b]Mas quando eu troco a ordem das linhas,
meus inputText’s e comboBox são preenchidos com informações incorretas!
Parece que o índice não atualiza!
Espero ter sido claro!!!
Desde já agradeço a atenção!
[/b]