Overwrite ID generation in JSF / XPages not to use :? -
when defining element in xpages this:
<xp:div id="chartsurface"></xp:div>
the resulting html looks this:
<div id="view:_id1:_id4:chartsurface"></div>
which "necessary" since id must unique , jsf/xpages element repeated many times. while can client id using #{id:chartsurface}
, makes addressing elements unnecessarily hard since ":" clashes css pseudo selectors , libraries d3js fail (haven't tested jquery, dojo.byid seems work). there way tell jsf/xpages utilize different delimiter (e.g. none or %) result this:
<div id="view_id1_id4chartsurface"></div> <div id="view%_id1%_id4%chartsurface"></div>
bonus question: delimiters save use?
as far know there no way alter separator utilize of configuration hardcoded xpages source (into uicomponentbase more specific).
theoretically can seek replace clientid utilize of renderer. there public method convertclientid(facescontext context, string clientid) can overriden , can illustration replace ':' other char sequence.
unfortunately im not sure if findcomponent function work after change.
jsf xpages
No comments:
Post a Comment