I got a dropdown box and a inputtext box and based on the selection of the dropdown box the input box is enabled/disabled. I am using the
JSF and using the valuechangelistner with the h:selectOneMenu. The code snippet is as follows
<h

utputLabel for="morningstar">
<h:selectOneMenu valueChangeListener="#{morningStarBean.processValueChanged}" immediate="true" onchange="submit()" value="morningstar" styleClass="values">
<f:selectItem itemValue="blank" itemLabel="" />
<f:selectItem itemValue="TwoFifty" itemLabel="$250.00"/>
<f:selectItem itemValue="ManualEntry" itemLabel="Manual Entry"/>
</h:selectOneMenu>
<h:inputText value="#{morningStarBean.newValue}" required="false" disabled="#{morningStarBean.result}" size="6" maxlength="6"/>
and the bean looks like this
public void processValueChange(ValueChangeEvent event) throws AbortProcessingException{
newValue= (
String)event.getNewValue();
System.out.println(newValue);
FacesContext.getCurrentInstance().renderResponse();
}
But it's not helping me in anyway. It's not getting the changed value based on which I enable or disable the text box. Any help would be highly appreciated.