When defining an element in XPages like this:
<xp:div id="chartSurface"></xp:div>
the resulting HTML looks like this:
<div id="view:_id1:_id4:chartSurface"></div>
which is "necessary" since the ID must be unique and the JSF/XPages element could be repeated many times. While I can get the client id using #{id:chartsurface}
, this makes addressing elements unnecessarily difficult since the ":" clashes with CSS pseudo selectors and libraries like d3js fail (haven't tested it with jQuery, dojo.byId seems to work). Is there a way to tell JSF/XPages to use a different delimiter (e.g. NONE or %) so the result would look like this:
<div id="view_id1_id4chartSurface"></div>
<div id="view%_id1%_id4%chartSurface"></div>
Bonus question: Which delimiters would be save to use?