Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-4203

JcrNewNodeAdapter#isNew should not return hardcoded true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Neutral Neutral
    • 5.5.5
    • None
    • vaadin integration
    • None
    • Yes
    • Basel 94, Basel 95, Basel 96, Basel 97
    • 3

      JcrNewNodeAdapter#isNew currently returns always true (hardcoded), even after the first successful save. Saving to JCR doesn't necessarily mean that e.g. an app (or subapp) is done with the adapter, therefore, after the first save, subsequent calls to JcrNewNodeAdapter#isNew should return false in order to avoid incorrect or unexpected behaviour in code relying on that method.

      To the objection that changing the behaviour of JcrNewNodeAdapter#isNew now may cause unexpected behaviour in code relying on the fact that it always returns true one could reply by saying that we would just make the method honour its semantics as per javadoc at info.magnolia.ui.vaadin.integration.ItemAdapter#isNew

      @return true if it's a new Item (not already persisted).

      which basically is the same as javax.jcr.Item#isNew

      Returns true if this is a new item, meaning that it exists
      only in transient storage on the Session and has not yet been saved.
      

        Acceptance criteria

              fgrilli Federico Grilli
              fgrilli Federico Grilli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD