Hi,
This is the code that I have -
1) When I enter some data in the shortCodePrefix componentm the selectOneMenu in sourceTypeField gets disabled ( this is fine)
2) When I remove that data (shortCodePrefix.length() becomes '0') , the selectOneMenu should get enabled again ! but that does not happen, It remains disabled.
<s:decorate id="shortCodePrefixField" template="layout/editTRRLabel.xhtml">
<ui:define name="label">Short Code Prefix</ui:define>
<h:inputText id="shortCodePrefix"
size="15"
maxlength="15"
value="#{scroutingHome.instance.shortCodePrefix}">
<a:support event="onblur" reRender="sourceTypeField" bypassUpdates="false" ajaxSingle="true"/>
</h:inputText>
<h:outputText value="#{scroutingHome.instance.shortCodePrefix}"/>
</s:decorate>
<s:decorate id="sourceTypeField" template="layout/editTRRLabel.xhtml">
<ui:define name="label">Source</ui:define>
<h:selectOneMenu id="srcType" value="#{scroutingHome.instance.sourceType}" style="width:80px;" disabled= "#{scroutingHome.instance.shortCodePrefix.length() gt 0}">
<f:selectItem itemValue="" itemLabel=""/>
<f:selectItem itemValue="MO" itemLabel="MO-AT"/>
<f:selectItem itemValue="AO" itemLabel="AO-AT"/>
<a:support event="onchange" reRender="shortCodePrefixField" bypassUpdates="false" ajaxSingle="true"/>
</h:selectOneMenu>
</s:decorate>