Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1846

Page fields not getting cleaned up in pool

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 5.0.6
    • Fix Version/s: None
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Here's my use case that shows the problem.
      I have a page class with the following field:

      private MyBean _myBean = new MyBean("default");

      where MyBean is a simple class like:

      public class MyBean {

      private String _value;

      public MyBean(String value)

      { _value = value; }

      public String getValue()

      { return _value; }

      public void setValue(String value)

      { _value = value; }

      }

      In the page class i have this meta annotation:

      @Meta(

      {"tapestry.persistence-strategy=flash"}

      )

      In my page template i have this textfield inside a form:

      <t:textfield value="myBean.value"/>

      So, the expected behaviour would be for the textfield value to be reset to "default" when i refreshed the page after it rendered just like any other normal textfield. But no, after i submit the form once this textfield will always have the submited value and it will never again reset to the default value. All other fields on the same page reset to their default values, this one doesn't.
      The only difference between this field and the other fields is that the other fields access the property directly while this access the property though a bean.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hlship Howard Lewis Ship
                Reporter:
                hpalma Hugo Palma
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: