i have a problem with ajax update .From a SelectOneMenu component i want to select a sorting option but the ajax call is always made with the last not current option selected .
This is the code snippet used, the update component is a LazyDataModel which data i want to sort. I am new to jsf and primefaces , hope i was clear enough.
<p:selectOneMenu id="selectSortDirection" value="#{notificationListView.sortDirection}">
<f:selectItems value="#{notificationListView.sortDirections}" var="currItem"
itemLabel="#{currItem.label}" itemValue="#{currItem.value}" />
<p:ajax event="change" update="notificationListDataTable" />
</p:selectOneMenu>
Check the following :
If you add a listener to
ajax, inlistenermethod you see the right value ofnotificationListView.sortDirection? and does the getter of thenotificationListView.sortDirectioncalled after your listener method ?