You are on page 1of 1

<f:view>

<afh:html>
<afh:head title="FileUpload">
<meta http-equiv="Content-Type" content="text/html; charset=windows-
1252" />
<afh:script source="progressIndicator.js" />
</afh:head>
<afh:body onload="deactivateProgressIndicators();">
<af:messages/>
<af:form usesUpload="true">
<af:inputHidden id="fileUploadStatus" value="#{MyFileUploadBean.
fileUploadStatus}" />
<af:panelBox>
<af:inputFile valueChangeListener="#{MyFileUploadBean.fileUp
loaded}" />
<af:commandButton text="start upload" id="startButton" actio
nListener="#{MyFileUploadBean.doUpload}" onclick="reactivateProgressIndicators()
;" />
</af:panelBox>
<af:panelBox id="panelBox" inlineStyle="display:none">
<af:panelHeader text="File is being uploaded" />
<af:progressIndicator id="progressIndicator" value="#{MyProg
ressRangeModel}" partialTriggers="pollid">
<af:outputFormatted styleUsage="instruction" value="Task
status not known" rendered="#{MyProgressRangeModel.value == -1}" />
<af:outputFormatted styleUsage="instruction" value="#{My
ProgressRangeModel.value} of #{MyProgressRangeModel.maximum} Completed" rendered
="#{MyProgressRangeModel.value > -1}" />
</af:progressIndicator>
<af:poll id="pollid" interval="1000" />
</af:panelBox>
</af:form>
</afh:body>
</afh:html>
</f:view>

You might also like