Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-172

Component reAttach and versioning

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0 branch (discontinued)
    • 2.0 branch (discontinued)
    • wicket
    • None

    Description

      I'm reAttaching a component doing something like:

      MyFooPanel p1 = new MyFooPanel(this, "panel";
      MyBarPanel p2 = new MyBarPanel(this, "panel");
      p1.reAttach();

      When I try to restore to the initial page version I found that the component with id "panel" is not a children component of the page.

      I have investigated it and I think it is because when the component is reAttached the order in which the changes are added to the ChangesList is:

      • Add p2.
      • Remove p1.

      When the initial version is restored the undo functionality is done in reverse mode like,

      • Add p1.
      • Remove p2.

      The problem is p1 and p2 have the same id, so when p2 is removed what is removing is p1 that has just added.

      Oscar.

      Attachments

        Activity

          People

            jcompagner Johan Compagner
            oscar.bueno@isencia.com Oscar Bueno
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: