h:selectOneMenu中的Ajax支持

I have to call backend code as soon as one value is selected from drop-down list. I am using JSF 2.0. In JSF 1.2 I did it by using <a4j:support> in <h:selectOneMenu>, but I am not geting how to do it in JSF 2.0.

Use the <f:ajax> tag. It's much similar to the <a4j:support>.

<h:selectOneMenu value="#{bean.selectedItem}">
    <f:selectItems value="#{bean.selectItems}" />
    <f:ajax listener="#{bean.valueChanged}" />
</h:selectOneMenu>

with

public void valueChanged() {
    // ...
}

The <f:ajax> has also an event attribute which already defaults to valueChange when used in <h:selectOneMenu>, so it is been omitted.