¿Cómo obtener valor de <h: selectOneMenu>?

Quiero obtener el valor de. Intenté este código pero no funciona:

<h:form>
        <h:outputLabel value="départements : "/>
        <h:selectOneMenu value="#{departementController.selected.id}" onchange="submit()" immediate="true">
            <f:valueChangeListener type="Controller.Listener.DepartementValueListener"/>
            <f:selectItems value="#{departementController.itemsAvailableSelectOne}"/>
        </h:selectOneMenu>

        <h:outputLabel value="nouvelle valeur : "/>

        <h:inputText value="#{departementController.comboBox}" id="dep"/>
    </h:form>

el controlador :

 //departement change listener
private String comboBox;

public String getComboBox() {
    return comboBox;
}

public void setComboBox(String comboBox) {
    this.comboBox = comboBox;
}

public void departementChangeListener(ValueChangeEvent e) {
    // Skip validation of non-immediate components and invocation of the submit() method.
    FacesContext.getCurrentInstance().renderResponse();
    this.comboBox = e.getNewValue().toString();}

sourceId = j_idt7: j_idt9 [severity = (ERROR 2), summary = (j_idt7: j_idt9: erreur de validation. La valeur est incorrecte.), detail = (j_idt7: j_idt9: erreur de validation.)]

Respuestas a la pregunta(1)

Su respuesta a la pregunta