New recipe: Include Javascript conditionally in page

In the beginning of the year, I defined the goal to achieve the 40 recipes in my blog: 22 in 2013 and 18 in 2014. With this recipe, I finally achieve that mark and may prepare myself to exceed it until the end of the year or start creating new ones to achieve the mark of 60 for the next year.


Primefaces hotkey trick

Do you need to conditionally use a keyboard key such as ‘esc’ to handle a given behaviour on a Web page such as cancelling the edition of a given page section? Are you facing any problems with multiple key bindings to that page? If that is the case, this is probably the right solution for you.