I'm in Dojo 1.7, async loading.
I've got a contentpane that I populate via ajax with content. I want to use a uploader declaritively in this content - how do I require the uploader properly?
Let's say this is my server page I am using to generate my content that will be set as the contentpane:
<script>
require(["dojox/form/uploader/FileList",
"dojox/form/uploader/plugins/Flash"]);
</script>
<center>
<input type="file" multiple="true" data-dojo-type="dojox.form.Uploader"
data-dojo-props='
label:"Foo My Bar!",
url:"/tests/UploadFile.php",
uploadOnSelect:"true"'/>
</center>
<br>
<div id="files" data-dojo-type="dojox.form.uploader.FileList"
data-dojo-props='uploaderId:"uploader"'></div>
But this does not work: the widget classes are not found. I understand this is because the loader is in async mode, and apparently the parser is attempting to render the widgets before the require calls have completed.
So, question is, how to do this properly? If I put the require calls in the main page of the app, things work (including on widgets that are declaratively set in the main page).