UIInstructions cannot be cast

I f, like me, you are getting an error message along the lines of “UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement” you are in luck because here’s the answer.

Setting a value to null with EL

Beginning with Expression Language (EL) 2.2 it is possible to call method with arguments. I feel that most of the time it is generally a good idea to try not to use this feature because it breaks the KISS principal but when you need it it can be a life saver.