thomashan / zkgrails

Automatically exported from code.google.com/p/zkgrails
0 stars 0 forks source link

Load Order of Multiple land-addon.xml in zk.xml #311

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which version of ZKGrails you're using? On what operating system?
2.1.0, Mac Lion

Which version of Grails you're using?
2.1.1

What steps will reproduce the problem?
1.create multiple lang-addon.xml files
2.Add these files to zk.xml's language-config
3. Load the page and view source in the browser

What is the expected output? What do you see instead?
In the browser view source, all the js files should be loaded in the order 
mentioned in the zk.xml, Instead it is not maintaining the order.

Please provide any additional information below. Attaching a test case to
reproduce it is preferable.

Example:
In zk.xml:
<language-config>
    <addon-uri>1-lang-addon.xml</addon-uri>
    <addon-uri>2-lang-addon.xml</addon-uri>
   <addon-uri>3-lang-addon.xml</addon-uri>
</language-config>

The order js files are loaded in the browser.

    3-lang-addon.xml
    1-lang-addon.xml
    2-lang-addon.xml

Original issue reported on code.google.com by jayonly...@gmail.com on 22 Mar 2013 at 10:09

GoogleCodeExporter commented 8 years ago
The issue is grails is copying the lang-addon.xml file to resources folder.  I 
have lang-addon in src/java/metainfo/zk/lang-addon.xml. grails is copying all 
files excluding *.java to resources folder in .grails.

I have lang-addon.xml file in each plugin, grails is copying and overwriting 
the lang-addon.xml in resources folder and finally the last one survives. ZK is 
loading the lang-addon.xml in the resources folder first. So some reason the 
lang-addon.xml that survives in grails 1.3.7 and 2.1.1 is different. This is 
causing issues in the loading order of the scripts in the browser.

I fixed moving the lang-addon out of src/java folder and thus grails will not 
copy the file into resources folder.

All is well.

Original comment by jayonly...@gmail.com on 26 Mar 2013 at 9:31

GoogleCodeExporter commented 8 years ago
Glad it's working for you.

Shall I close this issue then?

Original comment by chanwit on 26 Mar 2013 at 12:11

GoogleCodeExporter commented 8 years ago

Original comment by chanwit on 15 Apr 2013 at 7:41

GoogleCodeExporter commented 8 years ago
Closed as WontFix

Original comment by chanwit on 15 Apr 2013 at 7:41