Author: konstantin.mishin
Date: 2010-11-26 11:36:57 -0500 (Fri, 26 Nov 2010)
New Revision: 20184
Modified:
sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml
Log:
RF-9501
Modified: sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml
===================================================================
--- sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml 2010-11-26
16:35:24 UTC (rev 20183)
+++ sandbox/trunk/examples/fileupload-demo/src/main/webapp/fileupload.xhtml 2010-11-26
16:36:57 UTC (rev 20184)
@@ -40,7 +40,25 @@
<f:selectItems value="#{skinBean.skins}"/>
</h:selectOneMenu>
<br />
- <fu:fileUpload id="fu" enabled="#{fileUploadBean.enabled}"
fileUploadListener="#{fileUploadBean.listener}"/>
+ <script type="text/javascript">
+ <!--
+ var onfilesubmit = function (event) {
+ var data = event.rf.data;
+ RichFaces.log.info(jQuery("<span><b>onfilesubmit: </b>" +
data.name + " " + data.state + "</span>"));
+ };
+
+ var onuploadcomplete = function (event) {
+ var data = event.rf.data;
+ var str = "";
+ RichFaces.log.info(jQuery("<b>onuploadcomplete:</b>"));
+ for (var i in data) {
+ var item = data[i];
+ RichFaces.log.info(" " + item.name + " " + item.state);
+ }
+ };
+ //-->
+ </script>
+ <fu:fileUpload id="fu" enabled="#{fileUploadBean.enabled}"
fileUploadListener="#{fileUploadBean.listener}"
onfilesubmit="onfilesubmit(event)"
onuploadcomplete="onuploadcomplete(event)"/>
<h:outputText value="File name:" />
<a4j:outputPanel
ajaxRendered="true">#{fileUploadBean.item.fileName}</a4j:outputPanel>
<br />
@@ -50,6 +68,7 @@
</h:selectBooleanCheckbox>
<br />
<input type="submit" />
+ <a4j:log />
</h:form>
</h:body>
</html>
Show replies by date