Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 43254 invoked from network); 2 Feb 2007 14:50:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Feb 2007 14:50:36 -0000 Received: (qmail 41783 invoked by uid 500); 2 Feb 2007 14:50:40 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 41723 invoked by uid 500); 2 Feb 2007 14:50:40 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 41712 invoked by uid 99); 2 Feb 2007 14:50:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 06:50:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of grek@tuffmail.com designates 216.86.168.178 as permitted sender) Received: from [216.86.168.178] (HELO mxout-03.mxes.net) (216.86.168.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 06:50:30 -0800 Received: from [192.168.1.4] (unknown [87.206.142.101]) by smtp.mxes.net (Postfix) with ESMTP id 6BBFC51943 for ; Fri, 2 Feb 2007 09:50:09 -0500 (EST) Message-ID: <45C34F97.9000508@tuffmail.com> Date: Fri, 02 Feb 2007 15:49:59 +0100 From: Grzegorz Kossakowski User-Agent: Thunderbird 1.5.0.9 (X11/20060911) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Dojo paths problem References: <45C2720A.7080906@tuffmail.com> In-Reply-To: <45C2720A.7080906@tuffmail.com> Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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"); > > 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