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

Remove the hack in HTML viewer's ObjectView#execute() w.r.t. ImmutableFacet

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.1.2-incubating
    • 0.2.0-incubating
    • None
    • None

    Description

      if (isEditable) {
      // TODO: this test should be done by the ImmutableFacetFactory installing an immutableFacet on every
      // member
      final boolean immutable =
      ImmutableFacetUtils.isAlwaysImmutable(specification)

      (adapter.isPersistent() && ImmutableFacetUtils.isImmutableOncePersisted(specification));

      boolean allFieldUneditable = true;
      final List<ObjectAssociation> flds = specification.getAssociations();
      for (int i = 0; i < flds.size(); i++) {
      if (flds.get.isVisible(authenticationSession, adapter).isAllowed() && flds.get.isUsable(authenticationSession, adapter).isAllowed())

      { allFieldUneditable = false; break; }

      }
      if (!immutable && !allFieldUneditable)

      { content.add(context.getComponentFactory().createEditOption(id)); }

      }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: