5 Replies Latest reply on Dec 4, 2008 5:52 PM by Nick Belaevski

    rich:fileUpload component problem (progressbar does not upda

    Gianfranco Zola Newbie

      Hi!

      A searched long on the forum, but did not find any topic discussing this problem.

      So, if I put a rich:fileUpload component on a page, it works perfectly (including the uploadlistener in the backing bean), except the visual representation.

      The progressbar does not move on during the uploading. This is not really the truth, it moves on about 2 pixels, and stays there. Even if I upload a file greater than 500Mb. This would take some seconds even on LAN, so I should see some progress on the progressbar.

      Beside the label facet is completely ignored, and just the "Uploading" text is displayed. I tried quite everything, googled for hours, but nothing. Even the richfaces livedemo functions the same. I tried it with FF 3.0 and IE6.0, same effect with both. Nothing.

      This is my code wich defines the upload component:

      <a4j:form>
      <rich:fileUpload maxFilesQuantity="100" noDuplicate="true" ajaxSingle="true" allowFlash="false">
      <f:facet name="label">
      <h:outputText value="{_KB}KB uploaded from {KB}KB --- {mm}:{ss}"/>
      </f:facet>
      </rich:fileUpload>
      </a4j:form>
      


      Does anyone have an example where the progressbar moves on, and the uploaded bytes are displayed from the label facet?

      What could be my mistake?

      Thanks,

      gizola

        • 1. Re: rich:fileUpload component problem (progressbar does not
          Andrei Markavtsov Apprentice

          Please post here your environment configuration and RF version you use.

          • 2. Re: rich:fileUpload component problem (progressbar does not
            Gianfranco Zola Newbie

            web.xml

            <?xml version="1.0"?>
            <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
             <description>Facelets StarterKit</description>
             <display-name>pw</display-name>
             <context-param>
             <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
             <param-value>.xhtml</param-value>
             </context-param>
             <context-param>
             <param-name>facelets.REFRESH_PERIOD</param-name>
             <param-value>2</param-value>
             </context-param>
             <context-param>
             <param-name>facelets.DEVELOPMENT</param-name>
             <param-value>true</param-value>
             </context-param>
             <context-param>
             <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
             <param-value>client</param-value>
             </context-param>
             <context-param>
             <param-name>com.sun.faces.validateXml</param-name>
             <param-value>true</param-value>
             </context-param>
             <context-param>
             <param-name>com.sun.faces.verifyObjects</param-name>
             <param-value>true</param-value>
             </context-param>
             <context-param>
             <param-name>org.ajax4jsf.SKIN</param-name>
             <param-value>classic</param-value>
             </context-param>
             <context-param>
             <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
             <param-value>false</param-value>
             </context-param>
             <context-param>
             <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
             <param-value>true</param-value>
             </context-param>
             <context-param>
             <param-name>org.richfaces.LoadStyleStrategy</param-name>
             <param-value>DEFAULT</param-value>
             </context-param>
             <context-param>
             <param-name>org.richfaces.LoadScriptStrategy</param-name>
             <param-value>DEFAULT</param-value>
             </context-param>
             <context-param>
             <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
             <param-value>com.sun.facelets.FaceletViewHandler</param-value>
             </context-param>
             <filter>
             <display-name>Ajax4jsf Filter</display-name>
             <filter-name>ajax4jsf</filter-name>
             <filter-class>org.ajax4jsf.Filter</filter-class>
             <init-param>
             <param-name>createTempFiles</param-name>
             <param-value>true</param-value>
             </init-param>
             <init-param>
             <param-name>maxRequestSize</param-name>
             <param-value>3000000</param-value>
             </init-param>
             </filter>
             <filter-mapping>
             <filter-name>ajax4jsf</filter-name>
             <servlet-name>Faces Servlet</servlet-name>
             <dispatcher>FORWARD</dispatcher>
             <dispatcher>INCLUDE</dispatcher>
             <dispatcher>REQUEST</dispatcher>
             <dispatcher>ERROR</dispatcher>
             </filter-mapping>
             <servlet>
             <servlet-name>Faces Servlet</servlet-name>
             <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
             <servlet-mapping>
             <servlet-name>Faces Servlet</servlet-name>
             <url-pattern>*.jsf</url-pattern>
             </servlet-mapping>
             <session-config>
             <session-timeout>120</session-timeout>
             </session-config>
             <security-constraint>
             <display-name>JSF Template</display-name>
             <web-resource-collection>
             <web-resource-name>Template</web-resource-name>
             <url-pattern>/Template/*</url-pattern>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
             <http-method>PUT</http-method>
             <http-method>DELETE</http-method>
             <http-method>HEAD</http-method>
             <http-method>OPTIONS</http-method>
             <http-method>TRACE</http-method>
             </web-resource-collection>
             <auth-constraint>
             <role-name>AuthUser</role-name>
             </auth-constraint>
             <user-data-constraint>
             <transport-guarantee>NONE</transport-guarantee>
             </user-data-constraint>
             </security-constraint>
             <security-constraint>
             <display-name>JSF Form</display-name>
             <web-resource-collection>
             <web-resource-name>Form</web-resource-name>
             <url-pattern>/Form/*</url-pattern>
             <http-method>GET</http-method>
             <http-method>POST</http-method>
             <http-method>PUT</http-method>
             <http-method>HEAD</http-method>
             <http-method>DELETE</http-method>
             <http-method>OPTIONS</http-method>
             <http-method>TRACE</http-method>
             </web-resource-collection>
             <auth-constraint>
             <role-name>AuthUser</role-name>
             </auth-constraint>
             <user-data-constraint>
             <transport-guarantee>NONE</transport-guarantee>
             </user-data-constraint>
             </security-constraint>
             <login-config>
             <auth-method>FORM</auth-method>
             <realm-name>PlugandWork</realm-name>
             <form-login-config>
             <form-login-page>/Common/login.jsf</form-login-page>
             <form-error-page>/Common/loginerror.jsf</form-error-page>
             </form-login-config>
             </login-config>
             <security-role>
             <role-name>AuthUser</role-name>
             </security-role>
            </web-app>
            


            faces-config.xml
            <?xml version="1.0" encoding="UTF-8"?>
            <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xi="http://www.w3.org/2001/XInclude"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
             <managed-bean>
             <managed-bean-name>pagebean</managed-bean-name>
             <managed-bean-class>hu.iqsys.dynpages.Pagebean</managed-bean-class>
             <managed-bean-scope>request</managed-bean-scope>
             </managed-bean>
             <managed-bean>
             <managed-bean-name>mainBean</managed-bean-name>
             <managed-bean-class>hu.iqsys.pw.MainBean</managed-bean-class>
             <managed-bean-scope>session</managed-bean-scope>
             </managed-bean>
             <navigation-rule>
             <navigation-case>
             <from-outcome>form</from-outcome>
             <to-view-id>/Form/form.xhtml</to-view-id>
             <redirect/>
             </navigation-case>
             <navigation-case>
             <from-outcome>main</from-outcome>
             <to-view-id>/Form/main.xhtml</to-view-id>
             <redirect/>
             </navigation-case>
             <navigation-case>
             <from-outcome>logout</from-outcome>
             <to-view-id>/Common/logout.xhtml</to-view-id>
             <redirect/>
             </navigation-case>
             <navigation-case>
             <from-outcome>timeout</from-outcome>
             <to-view-id>/Common/sessiontimeout.xhtml</to-view-id>
             <redirect/>
             </navigation-case>
             </navigation-rule>
             <validator>
             <validator-id>GenericValidator</validator-id>
             <validator-class>hu.iqsys.dynpages.utils.GenericValidator</validator-class>
             </validator>
             <application>
             <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
             </application>
            </faces-config>
            


            Richfaces Version: 3.2.2.GA

            Do you need anything else?

            Thanks!

            Gizola

            • 3. Re: rich:fileUpload component problem (progressbar does not
              senthil kumar Newbie

              I faced a similar problem before sometime. I got the new version of JSF, then the progress bar was working fine. Try updating your JSF jars

              • 4. Re: rich:fileUpload component problem (progressbar does not
                Andrei Markavtsov Apprentice

                Hi,

                Yes I got it. But it's strange.
                ProgressBar moves for some pixels and becomes frozen.
                I found out that it caused by progressBar code changes happened after 3.2.2.G.A release was announced.

                So I cannot explain why you have the same problem on 3.2.2.GA.
                I created th issue: https://jira.jboss.org/jira/browse/RF-4815.

                If you have possibility please attach there your war file with major code.

                • 5. Re: rich:fileUpload component problem (progressbar does not
                  Nick Belaevski Master

                  Hi,

                  Confirmed. The issue has been introduced as side effect of RF-4585