It seems like I should be able to find this with a half hour of searching the webs, but since I cannot:
What are the rules for valid JSF ids?
I read a garbled e-mail message that suggested there were limitations on - and _, but I’m getting IllegalArgumentExceptions and I think it’s due to the ids.
EDIT
java.lang.IllegalArgumentException: 6a945017207d46fd82b3d3bb7d2795f1
at javax.faces.component.UIComponentBase.validateId(UIComponentBase.java:549)
at javax.faces.component.UIComponentBase.setId(UIComponentBase.java:351)
at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:151)
It has to be a valid CSS identifier (the
identhere) and there should be no duplicates.See also:
Update: for the case you’re interested, here’s the source code of the validator as provided by
UIComponentBase#validateId():It’s however a little more strict than the CSS rules. They cannot start with a hyphen as well.