I want to show a new text field, or undisable it, when I select a specific item in p:selectOneMenu.
Code:
<p:selectOneMenu id="especie" value="#{histopatologiaMB.histopatologia.especie}">
<f:selectItem itemLabel="Selecione" itemValue="" />
<f:selectItem itemLabel="Canino" itemValue="Canino" />
<f:selectItem itemLabel="Caprino" itemValue="Caprino" />
<f:selectItem itemLabel="Coelho" itemValue="Coelho" />
<f:selectItem itemLabel="Felino" itemValue="Felino" />
<f:selectItem itemLabel="Suíno" itemValue="Suíno" />
<f:selectItem itemLabel="Equino" itemValue="Equino" />
<f:selectItem itemLabel="Ovino" itemValue="Ovino" />
<f:selectItem itemLabel="Ave Doméstica" itemValue="Ave Doméstica" />
<f:selectItem itemLabel="Silvestre" itemValue="Silvestre" />
</p:selectOneMenu>
After the user selects the item "Silvestre", the following inputMask or inputText should appear:
<p:inputMask id="detalhe" size="30" value="#{histopatologiaMB.histopatologia.silvestreDetalhe}" maxlength="255"/>
I've been searching for a solution and I've found some, but none resolved my issue. If someone knows how solve it, please help me.