Jquery Error in Demoiselle with JSF and Primefaces

Asked

Viewed 118 times

0

A Demoiselle application uses an upload button for each record inserted into a list. That is, at some point the page can contain from 1 to N repeated upload components according to the number 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 alert:

A script on this page may be running or stopped reply. You can stop it now or continue to check if he finishes the execution.

Script: http://localhost:8080/sas/javax.faces.Resource/jquery/jquery.js.jsf? ln=primefaces:23

When we have more than 9 components, it seems that xhtml gets very slow when trying to reload the other upload components after the first file sent.

Follow 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>
  • You could put the contents of pom.xml and all xhtml and if possible the BC that is uploading. Initially being a javascript error can be configuration or version of some library. But I need this additional data. Is not discarded also something related to the browser, did the test in which of them? if in several, which?

  • OK. Dude, I did another analysis of the problem and the reason for the slowness was the "refresh" of all grid elements, including the upload buttons "select...". This was caused by the update that was in the component itself, which was intended to display the name of the file that was submitted. It turns out that this is already the default behavior of the upload component. Removing the "update grid" locking stopped. Thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.