cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: Dojo paths problem
Date Fri, 02 Feb 2007 14:49:59 GMT
Grzegorz Kossakowski napisaƂ(a):
> Hello,
>
> I'm still fighting with Dojo to get it working in refactored forms. My
> main problem is that I want to split stuff into separate parts but it
> seems that introduction of Dojo assumed that all js will be on similar
> urls and relative paths would just work fine. While that was true with
> old ("_cocoon/*") way of loading resources it's not in refactored
> environment.
>
> We have our own namespace for our widgets and manifest.js registering
> it. Dojo does not know about it, but is clever enough to guess where is
> it and load where required. However, in new way of loading block
> resources of one block are completely separated from other block's
> resource. While it's desired and one of my main aims it breaks dojo
> guessing badly. Take a look:
> http://localhost:8888/blocks-test/cocoon-ajax-impl/resources/forms/manifest.js
> http://localhost:8888/blocks-test/cocoon-ajax-impl/resources/forms.js
> http://localhost:8888/blocks-test/cocoon-ajax-impl/resources/dojo/__package__.js
>
> Whereby manifest.js is stored under:
> http://localhost:8888/blocks-test/cocoon-forms-impl/resources/forms/manifest.js
>
> Quick work-around was to tell dojo the path where manifest.js is stored:
> dojo.registerModulePath("forms",
> "servlet:forms:/resources/forms");                        <!-- tell dojo
> how to find manifest registering our forms namespace -->
>
> This fixes problem described above but I'm sure it's dirty hack and
> moreover another issues (path errors) arise really quickly.
>
> What's best way to solve this kind of problems? Am I good guessing that
> assumption of relative paths has been made while introducing dojo?
> Could some of those who has done this work actually speak on issues
> described above? Jeremy? Bruno?
>
>   
Ok, never mind. I've figured out all these things myself.
My current patches make all path independent from each other.

-- 
Grzegorz Kossakowski

Mime
View raw message