xforms - Conditionally include javascript file in xbl -
can conditionally include javascript file , css files.
<xbl:script src="/apps/xforms-sandbox/samples/myfile.js" />
can done conditionally?
at point, in orbeon forms, can't conditionally include scripts <xbl:script> or css <xbl:style>. include dynamic resources, use html elements <xhtml:script> , <xhtml:style> generate xstl, inside <xbl:template> of xbl component. if can use static resource, should:
- to avoid duplication — if have multiple instances of component when page loaded, same javascript or css end being included multiple times in page. might say: well, case anyway when using
<xbl:script>,<xbl:style>. yes, bug, we'll chance fix soon. - to benefit automatic minimization , combination — planning automatically combine , minimize resources references in xbl components, resources used core xforms engine itself. able benefit feature when lands in codebase if use
<xbl:script>,<xbl:style>.
Comments
Post a Comment