Bom dia Pessoal;
Gostaria de saber se alguem pode me ajudar, eu adicionei uma tabela em meu programa eu coloquei um checbox na primeira coluna, gostaria de saber como faço para quando eu selecionar o check box toda a linha ficar de uma cor especifica.
Agradeço se alguem poder me ajudar a encontrar uma solucao.
meu codigo para montar a lista da tabela é
public List<Movimentacao> getListaClienteTabela() {
//o metodo de buca com filtro foi personalizado no JPA
try {
return getApplicationBean1().getMovimentacaoJpaController().findMovimentacaoEntities();
} catch (Exception ex) {
tableMovimentacao.setTitle("Erro no filtro");
// ex.printStackTrace();
return null;
}
e no jsp chamo o metodo assim:
<webuijsf:table augmentTitle="false"
deselectMultipleButton="true"
selectMultipleButton="true"
binding="#{PMovimentacao.tableMovimentacao}"
id="tableMovimentacao"
style="left: 3%; right: 17%; top: 288px; position: absolute; width: 80%" width="706">
<webuijsf:tableRowGroup id="tableRowGroup1" rows="10" sourceData="#{PMovimentacao.listaClienteTabela}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Selecione" id="tableColumn5">
<webuijsf:checkbox id="checkbox1"
selected="#{currentRow.value['idCliente']}"
onClick="setTimeout('initAllRows()', 0)"
/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Cliente" id="tableColumn1" sort="idNomeCliente" valign="top">
<webuijsf:hyperlink actionExpression="#{PMovimentacao.selecionarMovimentacao}" id="Hyperlink_Cliente" text="#{currentRow.value['idNomeCliente']}">
<f:param name="movi" value="#{converte[currentRow.value['id']]}"/>
</webuijsf:hyperlink>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Container" id="tableColumn11" sort="idNomeContainer" valign="middle">
<webuijsf:staticText id="staticText11" text="#{currentRow.value['idNomeContainer']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Data Inicial" id="tableColumn2" sort="dataEnt" valign="middle">
<webuijsf:staticText id="staticText2" text="#{currentRow.value['dataEnt']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Data Final" id="tableColumn10" sort="dataSai" valign="middle">
<webuijsf:staticText id="staticText10" text="#{currentRow.value['dataSai']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Avaria" id="tableColumn7" sort="avaria" valign="middle">
<webuijsf:staticText id="staticText7" text="#{currentRow.value['avaria']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="qtdHandlin" id="tableColumn3" sort="qtdHandlin">
<webuijsf:staticText id="staticText1" text="#{currentRow.value['qtdHandlin']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Quantidade Diarias" id="tableColumn13" sort="qtdDiaras" valign="middle">
<webuijsf:staticText id="staticText13" text="#{currentRow.value['qtdDiaras']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Lavacao" id="tableColumn12" sort="lavacao" valign="middle">
<webuijsf:staticText id="staticText12" text="#{currentRow.value['lavacao']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="valorHandlig" id="tableColumn4" sort="valorHandlig">
<webuijsf:staticText id="staticText3" text="#{currentRow.value['valorHandlig']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Valor Diarias" id="tableColumn14" sort="valorDiarias" valign="middle">
<webuijsf:staticText id="staticText14" text="#{currentRow.value['valorDiarias']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Valor Manutencao" id="tableColumn16" sort="valormanutencao" valign="middle">
<webuijsf:staticText id="staticText16" text="#{currentRow.value['valormanutencao']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn align="center" headerText="Valor Total" id="tableColumn15" sort="valorTotal" valign="middle">
<webuijsf:staticText id="staticText15" text="#{currentRow.value['valorTotal']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>