Stackoverflow answer to JSF question 24468724.