The component ID should not contain the same character as the separator character. That's among others why the default separator character is :
. You cannot use it in the component ID, it would be invalidated according the rules of UIComponent#setId()
, but it is allowed in HTML element IDs.
However, if you change the default separator character by a javax.faces.SEPARATOR_CHAR
context parameter to a character which is allowed in component IDs, then you should be double as careful when specifying component IDs. You should namely make sure that you don't use exactly the separator character in the component ID, otherwise the UIViewRoot#findComponent()
method may break. This method is internally used by JSF to find components by client ID.
So, if your separator character is _
, then you should use it nowhere in your component IDs. The logical consequence is to consequently use -
instead.
See also: