Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1905

Not serializable: org.apache.tapestry5.tree.DefaultTreeExpansionModel - can't persist sessions across cluster

    Details

      Description

      org.apache.tapestry5.tree.DefaultTreeExpansionModel is not serializable but used in a persisted field in the Tree component in tapestry-core.

      If you want to persist your sessions to the filesystem or to database (for clustering) the serialization fails. the class contains only serializable values, so this can be fixed with adding the serializable interface to the DefaultTreeExpansionModel

      as a quick fix one can extend the DefaultTreeExpansionModel and add the serializable interface and use this class with the Tree component parameter "expansionModel":

      ///////////////////

      import java.io.Serializable;

      import org.apache.tapestry5.tree.DefaultTreeExpansionModel;

      public class SerializableTreeExpansionModel<T> extends DefaultTreeExpansionModel<T> implements Serializable

      { private static final long serialVersionUID = 88777116818436263L; }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hlship Howard M. Lewis Ship
                Reporter:
                felixgonschorek Felix Gonschorek
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: