Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 73015 invoked from network); 13 Jul 2006 10:30:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 10:30:34 -0000 Received: (qmail 2209 invoked by uid 500); 13 Jul 2006 10:30:29 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 2159 invoked by uid 500); 13 Jul 2006 10:30:29 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 2147 invoked by uid 99); 13 Jul 2006 10:30:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 03:30:29 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrewmadu@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 03:30:28 -0700 Received: by nf-out-0910.google.com with SMTP id a25so142708nfc for ; Thu, 13 Jul 2006 03:30:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=XWMZhYu9zNGN9qn/KgCn6py1UeYsBRT2a8OeFtIyZv2JqQaX1FDf9wS/cseZz9au6O0FjfcZtX9WQoHdJ0WLE8lLx4Dn/au5umgDuKO1PZ4cvYEujvRR/lniMWY1wUsfguLs9g51+rn1mtANOWaMxln76Mu+nwNceDcK8GNRPOw= Received: by 10.78.165.16 with SMTP id n16mr437195hue; Thu, 13 Jul 2006 03:30:06 -0700 (PDT) Received: by 10.78.151.7 with HTTP; Thu, 13 Jul 2006 03:30:06 -0700 (PDT) Message-ID: Date: Thu, 13 Jul 2006 11:30:06 +0100 From: "Andrew Madu" To: users@cocoon.apache.org Subject: Re: FATAL: Could not load 'dojo.widget.Button'; last tried '__package__.js' In-Reply-To: <44B61AA1.2040906@ebi.ac.uk> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10952_17945215.1152786606492" References: <44B61AA1.2040906@ebi.ac.uk> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_10952_17945215.1152786606492 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Anthony, I acheived the same thing by doing: What I also wanted to do was based on the file extention in {3} create a map:read mime-type ="x" /> using a case type statement. So: case {3} = ".html" map:read mime-type ="text/html" /> case {3} = ".gif" map:read mime-type ="image/gif" /> Any ideas? regards Andrew On 13/07/06, Antony Quinn wrote: > > Andrew, > > Try adding the following to your sitemap: > > > src="resources/scripts/{1}/{2}.js"/> > > > > src="resources/scripts/{1}/{2}.html"/> > > > The first match finds Javascript files at any depth in the Dojo > hierachy. The second match finds HTML file type at any depth. If your > Dojo application requires other resources, such as images or SWF files, > you would need to add additional matches to return the correct MIME type. > > Cheers, > > Antony > > Andrew Madu wrote: > > Hi, > > I am getting the above mentioned error in my cocoon application. I > > downloaded dojo-0.3.1-kitchen_sink.zip from > > http://download.dojotoolkit.org/release-0.3.1 , uncompressed the folder > > and placed it in the root directory of my project folder. Any ideas what > > is causing this problem? The code I am using is as follows: > > > > dojo.require("dojo.event.*"); > > dojo.require ("dojo.widget.*"); > > dojo.require("dojo.widget.Button"); > > ......... > > > > If I do ("dojo.widget.*") then the error goes away!, although I suspect > > that this is a red herring as my dodjo script doesn't work at all! What > > is the issue here? > > > > regards > > > > Andrew > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org > For additional commands, e-mail: users-help@cocoon.apache.org > > ------=_Part_10952_17945215.1152786606492 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Anthony,
I acheived the same thing by doing:

<map:match type="regexp" pattern="^(dojo|dojo_js)/(.*)(
\.gif.*)$">
                <map:read mime-type="image/gif" src="{1}/{2}{3}"/>
            </map:match>

What I also wanted to do was based on the file extention in {3} create a map:read mime-type ="x" /> using a case type statement. So:

<map:match .....>
case {3} = ".html"
   map:read mime-type ="text/html" />
case {3} = ".gif"
 map:read mime-type ="image/gif" />
</map:match>

Any ideas?

regards

Andrew


On 13/07/06, Antony Quinn <aquinn@ebi.ac.uk> wrote:
Andrew,

Try adding the following to your sitemap:

<map:match pattern="scripts/**/*.js">
   <map:read mime-type="text/javascript"
             src="resources/scripts/{1}/{2}.js"/>
</map:match>

<map:match pattern="scripts/**/*.html">
   <map:read mime-type="text/html"
             src="resources/scripts/{1}/{2}.html"/>
</map:match>

The first match finds Javascript files at any depth in the Dojo
hierachy. The second match finds HTML file type at any depth. If your
Dojo application requires other resources, such as images or SWF files,
you would need to add additional matches to return the correct MIME type.

Cheers,

Antony

Andrew Madu wrote:
> Hi,
> I am getting the above mentioned error in my cocoon application. I
> downloaded dojo-0.3.1-kitchen_sink.zip from
> http://download.dojotoolkit.org/release-0.3.1 , uncompressed the folder
> and placed it in the root directory of my project folder. Any ideas what
> is causing this problem? The code I am using is as follows:
>
> dojo.require("dojo.event.* ");
> dojo.require ("dojo.widget.*");
> dojo.require("dojo.widget.Button");
> .........
>
> If I do ("dojo.widget.*") then the error goes away!, although I suspect
> that this is a red herring as my dodjo script doesn't work at all!  What
> is the issue here?
>
> regards
>
> Andrew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


------=_Part_10952_17945215.1152786606492--