So I have a use case where I need to reset the selected value of the h:selectOneMenu. I am using the following code to tracke the old and new values:
<h:form id="peerForm">
<h:selectOneMenu id="selectPeer" value="#{peerAction.employeeId}" valueChangeListener="#{peerAction.processValueChange}">
<a4j:support event="onchange"
onchange="Richfaces.showModalPanel('mpChangePeer',{width:450, top:200})"/>
<f:selectItems value="#{peerAction.peers}" />
</h:selectOneMenu>
</h:form>private String selectedValue;
private String oldValue;
public void processValueChange(ValueChangeEvent value) {
selectedValue = (String)value.getNewValue();
oldValue = (String)value.getOldValue();
}