Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14289

FileUpload doesn't work with STATE_SAVING_METHOD = Client

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.5.14
    • Fix Version/s: None
    • Component/s: component-input
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      Use rich:FileUpload with ViewScoped ManagedBean and STATE_SAVING_METHOD = Client.

      Create a large xhtml file.

      try to upload.

      Show
      Use rich:FileUpload with ViewScoped ManagedBean and STATE_SAVING_METHOD = Client. Create a large xhtml file. try to upload.

      Description

      When try to use rich:FileUpload with ViewScoped and STATE_SAVING_METHOD = Client in web.xml, randomly the response is "Server error" and the component doesn't call the listener.

      After some studies, we discovery that error occurs when the javax.faces.ViewState is too large.

      The fileupload.js file call this.xhr.open('POST', newAction, true), and newAction receives the String: "&javax.faces.ViewState=" + encodeURIComponent(viewState);

      When xhr method use POST, there's no need to use queryString in newAction.

      To resolve this bug, we remove the line &javax.faces.ViewState=" + encodeURIComponent(viewState);

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cadubad Carlos Lambert
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: