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:

  1. 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.
  2. 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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -