Hi Ralf,

You wrote:
> thank you very much for your first class step-by-step guide. You made my
> day! [...]

I am glad to hear, that I could help you.


> Now there is only on XHR left for the file /js/layer/nls/myApp_de.js.
> Can I get rid of this by directly adding this file as a layer as well,
> depending on the sites language?

As I wrote, you can. Have a look at "dojo.requireLocalization" [1,2].


> The only problem left is about a Dojo extension called
> interpersonal.GroupedFilteringSelect. These widgets are not shown any
> more with my layer, although I have coped the files before the build to
> the mentioned directory. Then I rebuilt the layer without the extension
> and added it manually again via XHR. The file is loaded but the widget
> is still not shown.

In general:
You should not change files in your release directory after you have built
your layer.
At least you shouldn't do that with files, used in one of your layers...

"interpersonal.GroupedFilteringSelect" is not part of your layer, right?

Did you copy the whole release folder? If you are still using components,
which aren't located in your layer, you should do that... in that case, the
file must be located in "<dojoroot>/interpersonal/GroupedFilteringSelect.js"
(but it seems to be there, because you said the XHR was successful).

Does this file contains a "dojo.provide()"? Without a dojo.provide(), Dojo
don't know what's loaded.

If something goes wrong (syntax error in a JS file etc.) you should see that
in Firebug. So what does Firebug report? If there is a problem (e.g. the
mentioned syntax error), Dojo won't finish loading. But this is easily to
detect - just call a Dojo function, which will fail...

When everything seems to be correct, try to create your widget
programmatically in your Firebug console. Try something like

  var myWidget = new interpersonal.GroupedFilteringSelect(...);

This should really tell you an error...


Another tipp:
Create an empty HTML document, which just contains a DIV layer with an ID
attribute and Dojo core (dojo.js).
Now you are able to do everything "live" in the console, for example:

  var myOutput = dojo.byId("DivLayerId");
  var myWidget = new my.widget.foo({params}, myOutput);

(Remember to load "my.widget.foo" before you try to create it via
"dojo.require()"...)


> To clarify, the Dojo extension exists of the three files
> GroupedFilteringSelect.css, GroupedFilteringSelect.html and
> GroupedFilteringSelect.js so my guess is that the html file is not found
> any more.

This might be possible. At least when you add it after you have built you
layer.

Check your "templateString" line...

But Firebug should tell you, if it wasn't able to load the template.


P.s. You have to load the CSS on your own...


Please tell us, which Dojo version you are using.


See also:
=========
[1] http://www.dojotoolkit.org/reference-guide/dojo/requireLocalization.html

[2] http://api.dojotoolkit.org/jsdoc/HEAD/dojo.requireLocalization


-- 
Regards,
Thomas


Reply via email to