A Demoiselle application uses an upload button for each record inserted in a list. That is, at a certain point the page can contain from 1 to N repeated upload components according to the amount of records selected on the previous page. For example,
ID / Anexo / Descricao
1 Selecione Mala direta
2 Selecione Protesto
3 Selecione Compilação
...
However, when loading the first file for upload, I get the SCRIPT slowness warning:
A script on this page may be running or stopped from reply. You can stop it now or continue to check if it finishes running.
Script: link
As we have more than 9 components, it seems that xhtml gets very slow when trying to reload the other upload components after the first uploaded file.
Here are the codes:
xhtml:
<p:fileUpload id="fileUploadLink" fileUploadListener="#{cc.attrs.fileUploadListener}" auto="true" customUI="true"
label="#{cc.attrs.label}" disabled="#{cc.attrs.disabled}" update="#{cc.attrs.update}"
oncomplete="window.clearTimeout(timeoutAjaxStatus);timeoutAjaxStatus=null;statusDialog.hide();"
styleClass="file_input_hidden"/>
web.xml:
<filter>
<filter-name>PrimeFaces FileUpload Filter</filter-name>
<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
</filter>