I’m hoping that clicking a jsf radio button with primefaces will disable an inputText

Asked

Viewed 27 times

2

                <p:inputText id="txtCidadeFora" value="#{moradorRuaBean.moradorRua.cidade}"
                     disabled="#{moradorRuaBean.ishabilitaCidade == false}"></pmf:campoTexto>

Could someone help me?

In managedBean I created the boolean variable

  • Try to see if this solution meets your needs: https://answall.com/questions/161962/marcar-ou-desmaracar-selectbooleancheckbox-ao-clicar-em-other/

1 answer

0

As you already have a variable boolean in the bean associated with selectOneRadio, thus, when the value of this component is changed, it will be stored in the bean, so just put a <p:ajax /> to update the component <p:inputText/>. For example:

<p:selectOneRadio>
<p:ajax event=“change” update=“txtCidadeFora” />
</p:selectOneRadio>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.