• Runtime optimized javascript

    By Wojciech Klicki 1 decade ago

    Hello,

    If I use applicaton option "Use runtime optimized Javascript and CSS resources"  all standars dojo js is packed but is seems that this settings does not affect extension library stuff (for example Accordion js is loaded as separate file).

    Is this normal behaviour?

    • It should work

      By Philippe Riand 1 decade ago

      Where so you see it? It in fact works if the part of the page that uses the dojo module is rendered when the page is rendered initially. If, for example, your accordion is in a tab panel that is not rendered initially, then the dojo module won't be aggregated. To workaround the issue, add accordion module as a resource to the page.

      • Adding module declaration does not help ....

        By Wojciech Klicki 1 decade ago

        The accordion was inside facet of custom control - there was no dynamic container. But somehow I cannot create simple example of this behaviour - the accordion works well when put on a simple xpage. The application in which I have this effect is very complex and is really hard to extract what causes this problem.

        But I also use dialog component and with this component its very simple to see what kind of problems Im dealing with.

        Juts create empty xpage, add this code:

         

        asfasf
            
                             refreshMode="complete">
                    
                

         

        And then observer firebug - You will see that lots of js code is loaded separately (aggregation does not work as I imagine it should).