javascript - How can I access the tag-name of a jsf composite whitin the composite? -
i have composite (as in xmlns:composite="http://java.sun.com/jsf/composite"). call via
<comps:cimgx imgid="ima" flav="r" />
(for example) on page. there way reference html-objects generated composite, client-side via javascript?
something like
window.document.getelementsby_magic_jsf_tagtype("comps.cimagx");
edit: or within composite like
#{cc.jsf_tag_type_name}
??
edit2: background why i'm asking this, see is possible add javascript function h:form in jsf2?
js knows nothing server side code responsible producing html output on html document object model based. information has end in html in way. abstraction, make use of css classes.
<cc:implementation> <div id="#{cc.clientid}" class="comp-cimgx"> ... </div> </cc:implementation>
var cimgxs = document.getelementsbyclassname("comp-cimgx");
(note: getelementsbyclassname()
not supported in ie8 , lower, grab jquery 1.x if necessary)
Comments
Post a Comment