Boa tarde,
Gostaria de saber como faço para desabilitar um p:inputText automaticamente via ajax depois de clicar em um p:selectBooleanCheckbox?
veja me .xhtml abaixo:
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</h:head>
<h:body>
<h:form id="opcaoList">
<p:panelGrid columns="2">
<p:outputLabel for="listaQuest" value="Lista"></p:outputLabel>
<p:selectOneMenu id="listaQuest" style="width: 250px"
value="#{questionarioBean.idListaQuestionario}">
<f:selectItem itemLabel="Selecione" itemValue=""></f:selectItem>
<f:selectItems value="#{listaQuestionarioBean.listaQuestionarios}"
var="l" itemLabel="#{l.nome}" itemValue="#{l.id}"></f:selectItems>
</p:selectOneMenu>
<p:commandButton value="Carregar Lista"
action="#{questionarioBean.buscaPerguntas}" update=":perguntas"></p:commandButton>
</p:panelGrid>
</h:form>
<h:form id="perguntas">
<p:dataTable var="q" value="#{questionarioBean.listaQ}">
<p:column headerText="Pergunta">
<h:outputText value="#{q.pergunta.pergunta}"></h:outputText>
</p:column>
<p:column headerText="Resposta">
<p:outputLabel for="concluido" value="Concluido : " />
<p:selectBooleanCheckbox id="concluido" value="" />
<p:outputLabel for="conlcuidoParcialmente" value=" | Concluido Parcialmente : " ></p:outputLabel>
<p:selectBooleanCheckbox id="conlcuidoParcialmente" value="" />
<p:outputLabel for="naoConcluido" value=" | Não Concluido: " />
<p:selectBooleanCheckbox id="naoConcluido" value="" />
</p:column>
<p:column headerText="Justificativa">
<p:inputText id="justificativa" style="width: 180px"></p:inputText>
</p:column>
<p:column headerText="% concluida">
<p:inputText id="concluida" style="width: 50px"></p:inputText>
</p:column>
</p:dataTable>
</h:form>
</h:body>
</html>