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

[WON'T FIX] Non-JAXB view models do not support editable properties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 1.14.0
    • 1.17.0
    • None
    • None

    Description

      this is the case irrespective of whether editing is disabled globally using the isis.objects.editing=false)

      background:

      see https://stackoverflow.com/questions/44569302/apache-isis-propertyediting-editing-enabled-doesnt-work-for-viewmodels

      analysis:

      @Property(editing=ENABLED)
      this installs:
      DisabledFacetForPropertyAnnotationInvertedSemantics[interaction=Disabling,type=DisabledFacet,when=Always; where =Everywhere]

      then see @DomainObject(nature=VIEW_MODEL)
      DisabledFacetOnPropertyDerivedFromRecreatableObject[interaction=Disabling,type=DisabledFacet,when=Always; where =Anywhere]
      this overwrites:

      final Facet existingFacet = getFacet(facetType);
      if (existingFacet == null || existingFacet.isNoop())

      { facetsByClass.put(facetType, facet); return; }

      if (!facet.alwaysReplace())

      { return; }

      if (facet.isDerived() && !existingFacet.isDerived())

      { << doesn't return here, for example return; }

      facet.setUnderlyingFacet(existingFacet);
      facetsByClass.put(facetType, facet);

      then at the class level earlier would also have installed ImmutableFacet because of configuration property (if global property to disable editing)
      because of that, see:
      DisabledFacetOnPropertyDerivedFromImmutable[interaction=Disabling,type=DisabledFacet,when=Always; where =Anywhere]
      this overwrites once more.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: