Hi Thomas,

thanks again for your help.

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

I don't really get it. Do I need to add the dojo.requireLocalization()
to my layer file for the build? And if so, which should be entered? All
the stuff I am referring to in my layer? For example

dojo.requireLocalization("dijit.form", "dijit.Dialog", "dijit.layout",
"dijit.Tooltip", "dojox.widget.ColorPicker");

When I do that, I get a build error:

js: uncaught JavaScript runtime exception: TypeError: Cannot read
property "he" from undefined

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

Yes. It is referenced in my layer. And the corresponding
GroupedFilteringSelect.css file is also referenced in the css/myApp.css
file.

> 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).

Yes. In the /interpersonal directory the three GroupedFilteringSelect
files are located.

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

Yes. It says dojo.provide('interpersonal.GroupedFilteringSelect');

> 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...

Well, I got an error: "_1f9 is null". The error was found in line 16 of
myApp.js which holds everything. When I try to create the widget in the
Firebug console than I get the same error. I can click on it but that
doesn't give me any hint why the error occurs and how I can solve it.

But please read further....

> This might be possible. At least when you add it after you have built you
> layer.
> 
> Check your "templateString" line...

Finally, that was the key hint to get the whole solution. In the
GroupedFilteringSelect.js source file there were these two lines

templatePath: dojo.moduleUrl("interpersonal","GroupedFilteringSelect.html"),
templateString: "",

When the build was created the templatePath line was converted to a
templateString which included the content from the
GroupedFilteringSelect.html file. So in MyApp.js I have to lines of
"templateString". One with the content and one setting it to an empty
string right afterwards.

So, all I did was deleting the <templateString: "",> line in the source
and start the build again. Now in MyApp.js there was only one
"templateString" line and the widget was shown again! Success! :-)

> Please tell us, which Dojo version you are using.

It is the currently supported version in the Zend Framework 1.10.8 which
must be Dojo 1.4.1.

Thanks for your help and the perfect solution for my problem. :-)

Best regards,

Ralf

Reply via email to