Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1101

Avoid unexpected concurrency exceptions if using a custom page.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • core-1.8.0
    • 1.9.0
    • Viewer Wicket
    • None

    Description

      The Wicket viewer uses the redirect-after-post strategy, meaning that after an action is invoked, an EntityModel (wrapping the oid of the entity) is serialized as the content of the next page to show, but the browser is then returned as 30x response. The browser then reloads the page afresh.

      However, the entity model will (normally) encode the oid of the entity before the xactn of the first request has completed; if that entity is modified (as is normally the case) then that oid is stale.

      To counteract this the EntityPage page uses the onBeforeRender hook to load the objectAdapter from the EntityModel without concurrency checking.

      So far so good.

      However, the Wicket viewer also supports custom home pages. If these are rendered for the resultant entity then this hook is not called, resulting in a concurrency check exception.

      This ticket is therefore for the component factories (that render the object after the redirect) to load the entity without concurrent checking; this will allow them to work even if embedded in custom pages.

      Attachments

        Activity

          People

            Unassigned Unassigned
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: