I´m trying to enable
or disable
a inputTextarea
by select a option in selectOneMenu
.
If there is no value select it will be disable
but if one value is select, will be enabled
.
My problem is, I select a option and enable, i select no option
and disable
, and stop to refresh the component.
<p:row>
<p:column>
<p:outputLabel value="#{lbl['LABEL.ALTERARPARA']}"/>
</p:column>
<p:column>
<p:selectOneMenu value="#{atendenteBean.statusAlterado}" label="#{lbl['LABEL.ALTERARPARA']}" converter="atendenteStatusConverter" filter="true" filterMatchMode="contains">
<f:selectItem itemLabel="" itemValue="#{null}"/>
<f:selectItems value="#{atendenteBean.statusPossiveis}" var="status" itemLabel="#{status.descricao}"/>
<p:ajax update="motivo" event="change"/>
</p:selectOneMenu>
</p:column>
</p:row>
<p:row>
<p:column>
<p:outputLabel value="#{lbl['LABEL.MOTIVO']}"/>
</p:column>
<p:column>
<p:inputTextarea id="motivo" value="#{atendenteBean.pojo.motivo}" maxlength="100" cols="100" disabled="#{empty atendenteBean.statusAlterado}"/>
</p:column>
</p:row>