このコード(遊び場へのリンク:http://tinyurl.com/6ed9dyv)
var label = new qx.ui.basic.Label('<input type="file" id="files" name="files[]"/>').set({width: 250, rich:true, wrap:true});
var doc = this.getRoot();
doc.setLayout(new qx.ui.layout.VBox(10));
doc.add(label);
var button1 = new qx.ui.form.Button("Test");
doc.add(button1);
button1.addListener("execute", function(e) {
var obj = document.getElementById('files');
if (obj)
alert(obj.files.length);
});
私にはうまくいきません。obj.filesは常に未定義です。不思議なことに、別のタブに切り替えてからこのコードを含むタブに戻ると、複数のタブがあるアプリケーションで機能します。