简体   繁体   中英

Error with p:selectOneMenu in Primefaces 3.4.2

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:selectOneMenu is changed little bit, in that way that change event is fired immediately after page is loaded. This problem is manifesting when we have completely empty p:selectOneMenu , which means value of f:selectItems is null, and there is no f:selectItem for empty option. In that case we can see error TypeError: e.offset(...) is undefined in console and javascript is from that point useless, and nothing works any more. For now it has to be empty f:selectItem , or at least one element in f:selectItems .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM