dojo.require("xs.widget.Bar");
It is fetched correctly from http://localhost:8080/common/xs/widget/Bar.js
when running in source (not built) dojo 1.7.1. However, the url goes
wrong to http://localhost:8080/common/dojo/xs/widget/Bar.js with
'dojo' sit in the url when running in built dojo 1.7.1. My program
runs well both in built and not built dojo before 1.7. Any clue?
Rice
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation
Dojo-i...@mail.dojotoolkit.org
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
It is a bit hard to help your when you don't include a full example.
Are you sure that you have the same dojoConfig in bot scenarios. It is
this configuration that tells dojo where to find different modules.
Read more about it at:
http://dojotoolkit.org/documentation/tutorials/1.6/dojo_config/
And to your info:
dojo.require(..) is a legacy way to require dependencies, the new way
is to use the requireJS syntax:
require(["xs.widget.Bar"]);
http://dojotoolkit.org/features/1.6/async-modules
Best regards
Ivar Conradi Østhus
<script type="text/javascript" src="${common}/dojo/dojo.js"
dojoConfig="parseOnLoad: true, isDebug: true"></script>
<script type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.Toolbar");
dojo.require("dijit.Menu");
dojo.require("dijit.MenuItem");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.TabContainer");
dojo.require("dojox.layout.ContentPane");
dojo.require("dijit.InlineEditBox");
dojo.require("xs.widget.Bar");
For both scenario, the dojoConfig is same. What is different is the
dojo I use on the server side. One is built dojo 1.7.1, the other is
non-built dojo 1.7.1.
Thanks,
Rice
On Jan 8, 10:11 pm, Ivar <ivarc...@gmail.com> wrote:
> Hi,
>
> It is a bit hard to help your when you don't include a full example.
> Are you sure that you have the same dojoConfig in bot scenarios. It is
> this configuration that tells dojo where to find different modules.
> Read more about it at:http://dojotoolkit.org/documentation/tutorials/1.6/dojo_config/
>
> And to your info:
> dojo.require(..) is a legacy way to require dependencies, the new way
> is to use the requireJS syntax:
> require(["xs.widget.Bar"]);
>
> http://dojotoolkit.org/features/1.6/async-modules
>
> Best regards
> Ivar Conradi Østhus
>
> On 8 January 2012 14:46, Rice <rice...@gmail.com> wrote:
>
> > Hi,
> > I have a custom module xs.widget.Bar and I use it in a html file
> > like below,
>
> > dojo.require("xs.widget.Bar");
>
> > It is fetched correctly fromhttp://localhost:8080/common/xs/widget/Bar.js
> > when running in source (not built) dojo 1.7.1. However, the url goes
> > wrong tohttp://localhost:8080/common/dojo/xs/widget/Bar.jswith
> > 'dojo' sit in the url when running in built dojo 1.7.1. My program
> > runs well both in built and not built dojo before 1.7. Any clue?
>
> > Rice
>
> > ________________________________________________________
> > Dojotoolkit:http://dojotoolkit.org
> > Reference Guide:http://dojotoolkit.org/reference-guide
> > API Documentation:http://dojotoolkit.org/api
> > Tutorials:http://dojotoolkit.org/documentation
>
> > Dojo-inter...@mail.dojotoolkit.org
> >http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
>
> ________________________________________________________
> Dojotoolkit:http://dojotoolkit.org
> Reference Guide:http://dojotoolkit.org/reference-guide
> API Documentation:http://dojotoolkit.org/api
> Tutorials:http://dojotoolkit.org/documentation
>
> Dojo-inter...@mail.dojotoolkit.orghttp://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
could you try to do:
//Where to find "xs"-package
dojo.registerModulePath("xs", "/xs");
dojo.require("dojo.parser");
dojo.require("dijit.Toolbar");
dojo.require("dijit.Menu");
dojo.require("dijit.MenuItem");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.TabContainer");
dojo.require("dojox.layout.ContentPane");
dojo.require("dijit.InlineEditBox");
dojo.require("xs.widget.Bar");
Best regards,
Ivar Conradi Østhus
Rice
On Jan 8, 11:01 pm, Ivar <ivarc...@gmail.com> wrote:
> Hi again,
>
> could you try to do:
>
> //Where to find "xs"-package
> dojo.registerModulePath("xs", "/xs");
>
> dojo.require("dojo.parser");
> dojo.require("dijit.Toolbar");
> dojo.require("dijit.Menu");
> dojo.require("dijit.MenuItem");
> dojo.require("dijit.layout.BorderContainer");
> dojo.require("dijit.layout.TabContainer");
> dojo.require("dojox.layout.ContentPane");
> dojo.require("dijit.InlineEditBox");
> dojo.require("xs.widget.Bar");
>
> Best regards,
>
> Ivar Conradi Østhus
>
and it works. But based on documentation, /common/xs is a sibling
directory to /common/dojo, I should not need to call
registerModulePath.
Rice
On Jan 9, 12:37 am, Rice <rice...@gmail.com> wrote:
> Hi Ivar,
> xs is a sibling directory, /commons/xs, to the dojo directory, which
> is /common/dojo, so I don't need to registerModulePath for xs. Seehttp://dojotoolkit.org/reference-guide/dojo/registerModulePath.html
I agree! I have tested this myself and can verify the behavior you
describe. I guess this has to be a bug and should be fixed. You should
file a bug ticket for this issue.
Regards,
Ivar Conradi Østhus