test-fileuploadlist.lzx
<canvas debug="true">
<include href="incubator/uploader/fileuploadlist.lzx"/>
<window name="main" title="File Upload Test" x="5" y="5" width="610" height="450">
<view name="upview">
<hbox spacing="15"/>
<simplelayout axis="y" spacing="10"/>
<fileuploadlist name="fl1" maxsize="5000">
<handler name="ontext" reference="this.txtFile">
parent.upload.checkupload();
</handler>
</fileuploadlist>
<fileuploadlist name="fl2" maxsize="10000">
<handler name="ontext" reference="this.txtFile">
parent.upload.checkupload();
</handler>
</fileuploadlist>
<fileuploadlist name="fl3">
<handler name="ontext" reference="this.txtFile">
parent.upload.checkupload();
</handler>
</fileuploadlist>
<fileuploadlist name="fl4">
<handler name="ontext" reference="this.txtFile">
parent.upload.checkupload();
</handler>
</fileuploadlist>
<fileuploadlist name="fl5">
<handler name="ontext" reference="this.txtFile">
parent.upload.checkupload();
</handler>
</fileuploadlist>
<button name="upload" text="Upload" x="430" enabled="false">
<handler name="onclick">
for(var i=0; i<main.upview.subnodes.length;i++ ){
if(main.upview.subnodes[i] instanceof lz.fileuploadlist && main.upview.subnodes[i].selected==true){
main.upview.subnodes[i].myFileUpload.upload('upload.jsp');
}
}
</handler>
<method name="checkupload">
this.setAttribute('enabled',false);
for(var i=0; i<main.upview.subnodes.length;i++ ){
if(main.upview.subnodes[i] instanceof lz.fileuploadlist){
if(main.upview.subnodes[i].myFileUpload.uploadenable==true){
this.setAttribute('enabled',true);
}
}
}
</method>
</button>
<text name="txtMsg" x="10" width="500" multiline="true" text="${parent.fl1.myFileUpload.msg + '\n' +parent.fl2.myFileUpload.msg + '\n' +parent.fl3.myFileUpload.msg + '\n' +parent.fl4.myFileUpload.msg + '\n' +parent.fl5.myFileUpload.msg + '\n'}"/>
</view>
</window>
</canvas>
Cross References
Includes
Named Instances