<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<ui:composition template="/_template.xhtml">
<ui:define name="corpo">
<div class="...">
<div class="...">
<h:form id="form">
<table>
<c:forEach items="#{mBean.lista}" var="objeto" >
<tr>
<td>
<h:selectBooleanCheckbox value="#{objeto.marcado}">
<f:ajax render=":form:valor#{objeto.id} :form:lbValor#{objeto.id}" />
</h:selectBooleanCheckbox>
</td>
<td>
<h:outputLabel value="#{objeto.desc}" />
</td>
<td>
<h:outputLabel id="lbValor#{objeto.id}" value="Valor:" rendered="#{objeto.marcado}" />
</td>
<td>
<p:inputText id="valor#{objeto.id}" rendered="#{objeto.marcado}" value="#{objeto.valor}" />
</td>
</tr>
</c:forEach>
</table>
</h:form>
</div>
</div>
</ui:define>
</ui:composition>
</html>
Estou tentando fazer aparecer o input "valor" usando ajax no checkbox. Assim que ele for selecionado, o campo deverá aparecer, mas não estou com muita sorte.
Os valores passados à view são confiáveis, a única falha que enxergo é a falta de update do campo.
Idéias?
EDIT: Código atualizado.