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

suppress/disable the link in the first column of a table (CollectionProperty)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • viewer-wicket-1.7.0
    • None
    • Viewer Wicket
    • None

    Description

      Goal:
      Suppress/disable the link in the first column of a table (CollectionProperty) for marked DomainObjects.

      Proposal:

      • Add a new field to the @DomainObjectLayout like openable/viewable.
      • Special handling of title columns in CollectionContentsAsAjaxTablePanel / ObjectAdapterTitleColumn / EntityIconAndTitlePanel

      Background:

      I have a complex entity which is displayed in tables in different places.
      In one place I want to show a subset of properties only. For this
      projection I made a special in-memory object, which wraps the complex
      entity and has getters for the subset of properties only. How can I mark
      this inmemory object to be not openable, or with other words how do i suppress/disable the link in the first column.

      Dan/Martins "QuickFix" was:

      The column is added at

      https://github.com/apache/isis/blob/master/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.java#L96
      and I see no way how to suppress the addition in current master branch.

      The column is marked with "title-column" CSS class so it is easy to hide
      with: visibility:hidden;, but I'm not sure how easy is to detect on which
      page to apply this CSS rule.
      If you use 1.8.0-SNAPSHOT then maybe you can combine it with the new
      #cssClass() special method that may be used to set a custom CSS class. See
      http://issues.apache.org/jira/browse/ISIS-1000

      Am 26.01.2015 um 23:11 schrieb Dan Haywood <dan@haywood-associates.co.uk>:

      +1 to Martin's answer, there is no configuration setting but it is possible
      to hack it using Javascript and CSS and the new #cssClass in 1.8.0-SNAPSHOT.

      For example, the todo app uses #cssClass() so that completed todo items are
      shown in a table with a strikethrough. This comes from the "done" CSS
      class:

      public String cssClass()

      { return !isComplete() ? "todo" : "done"; }

      In webapp/css/application.css, if we add:

      tr.done a

      { pointer-events: none; cursor: default; }

      and in webapp/scripts/application.js, if we add:

      $(document).ready(function() {
      $('tr.done a').click(function()

      { return false; }

      );
      });

      then the icon for each completed item cannot be clicked.

      Attachments

        Activity

          People

            Unassigned Unassigned
            h2000 ARI
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: