cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Madu" <andrewm...@gmail.com>
Subject Re: FATAL: Could not load 'dojo.widget.Button'; last tried '__package__.js'
Date Thu, 13 Jul 2006 10:30:06 GMT
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
>
>

Mime
View raw message