Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3100

Repeated postbacks create additional serialized views

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.4
    • 2.0.6
    • General
    • None
    • JBoss 6.0.0.FINAL, MyFaces 2.0.4

    Description

      Each time a user initiates a post back, another view is serialized in the session. As a result, if the user does 20 postbacks (the default number of views to save) any other open views quickly get a ViewExpiredException.

      1) Deploy the example below
      2) Open a browser with a window to the page (http://localhost:8080/Web for example)
      3) Open another tab in the same browser to the same page (or whatever you need to do in your browser to ensure the two pages share a session)
      4) On the first page, click "Update foo" button 20 times.
      5) Now go to the second page and click "Update foo".
      6) Notice the ViewExpiredException

      @ManagedBean

      @SessionScoped

      public class testBackingBean implements Serializable{

      private String msg="foobar";

      public String getMsg()

      { return msg; }

      public void setMsg(String msg)

      { this.msg = msg; }

      }

      

      xhtml

      

      <?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:f="http://java.sun.com/jsf/core"

      xmlns:h="http://java.sun.com/jsf/html">

      <head>

      <title>This is a test page</title>

      </head>

      <body>

      <h:form>

      <h:outputText value="#

      {testBackingBean.msg}

      "/>

      <br/>

      <h:commandButton value="Update Foo" />

      </h:form>

      </body>

      </html>

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              robertgary1 Robert M. Gary
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 72h
                  72h
                  Remaining:
                  Remaining Estimate - 72h
                  72h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified