I recently updated Primefaces from 3.4 to 3.4.2 and now I have problems on some pages where there is p:selectOneMenu component. I see error in JavaScript console which says: TypeError: e.offset(...) is undefined. This error is logged immediately on page loading.
Does anyone know what is a problem?
OK, after a lot of time a finally figure out what’s happening. In Primefaces 3.4.2 behavior of
p:selectOneMenuis changed little bit, in that way that change event is fired immediately after page is loaded. This problem is manifesting when we have completely emptyp:selectOneMenu, which meansvalueoff:selectItemsis null, and there is nof:selectItemfor empty option. In that case we can see errorTypeError: e.offset(...) is undefinedin console and javascript is from that point useless, and nothing works any more. For now it has to be emptyf:selectItem, or at least one element inf:selectItems.