I wrote project with fileupload functional, i have button-multi-fileuplode with cyrillic name, when i browse files and click on button-upload with cyrillic label my files uploads and stored in table, after this all files parses and sometimes i have errors in files and when file has errors, in datatable there is a button-single-fileupdate with cyrillic name for reupload files.
1) BUT when i choose some files for upload and upload this files my button multiupload + button for reupload have name such as "???????????", when i press F5, all work good and i can continue work.
2) Also i have a button in datatable, witch show table with errors, if my uploaded files bad. When i do first multiupload, press F5 and want to see errors, press button and see table i see normal table, but if i second time upload some files (or reupload with my single-upload button), files normal add to table, but if i press button to show table with errors, i will see many dialog with table. The number of the traced windows depends on number of the loaded files. I.e. if I have loaded at first 3 files with errors, I can look tables with errors but if I have then finished loading 5 more files by pressing the button of display of the table with errors I will see most likely 6 dialogue windows the friend on the friend. I.e. again to see the main page to me it is necessary to close 6 windows successively. The most interesting that if I after upload these 5 files again I will press F5 all will work well. Prompt, please, that for an outset on this mysterious F5.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.prime.com.tr/ui" >
<f:view>
<h:body >
<h:form id="uploadPage" enctype="multipart/form-data" acceptcharset="charset=UTF-8">
<p:fileUpload id="fileUploader"
fileUploadListener="#{fileUploadController.handleFileUpload}"
mode="advanced"
multiple="true"
label = "Cyrillic_choose"
uploadLabel = "Cyrillic_upload"
cancelLabel = "Cyrillic_calcel"
/>
<p:dataTable id="table"
var="uploadResult"
value="#{fileUploadController.results}"
dynamic="true">
<p:column>
<f:facet name="header">
<h:outputText value="Cyrillic_file_name" />
</f:facet>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Cyrillic_file_type" />
</f:facet>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Cyrillic_status" />
</f:facet>
<p:fileUpload id="fileReUploader"
rendered = "#{uploadResult.upload}"
fileUploadListener="#{fileUploadController.reUpload}"
label = "Cyrillic_reload"
auto="true"
value="#{uploadResult}"
target="#{fileUploadController.selectedUploadResult}"
zindex="#{uploadResult.numberInList}"
update="uploadPage"
dynamic="true"/>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Cyrillic_error" />
</f:facet>
<h:outputText value="#{uploadResult.errorMessage}" />
<p:commandButton oncomplete="errorDialog.show()"
title="Cyrillic_detail"
rendered="#{!uploadResult.correctUpload}"
update="errorTable"
image="ui-icon ui-icon-search" >
<p:ajax update="errorTable"/>
<f:setPropertyActionListener value="#{uploadResult}" target="#{fileUploadController.selectResult}" />
</p:commandButton>
</p:column>
</p:dataTable>
<p:dialog header="Error Detail" widgetVar="errorDialog" resizable="false" id="errorDlg"
width="500" showEffect="fade" hideEffect="explode" modal="true" >
<p:dataTable id="errorTable"
var="errors"
value="#{fileUploadController.selectResult.errorList}">
<p:column>
<f:facet name="header">
<h:outputText valueCyrillic_line_number" />
</f:facet>
<h:outputText value="#{errors.lineNumber}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Cyrillic_discription" />
</f:facet>
<h:outputText value="#{errors.description}" />
</p:column>
</p:dataTable>
</p:dialog>
</h:form>
</h:body>
</f:view>
</html>
Primefaces 3.0 m3 + tomcat 7.0.19