Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1448

Reinstate component factory for collections, so that they can be easily substituted.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.0, 1.12.1, 1.12.2
    • Fix Version/s: 1.13.0
    • Component/s: Core: Viewer: Wicket
    • Labels:
      None

      Description

      The ability to easily swap out collections functionality was lost in 1.12.x (with the layout XML stuff). This is to reinstate it.

        Activity

        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 53626608c130bea75a471db3f94f750575a0d2f1 in isis's branch refs/heads/master from Dan Haywood
        [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5362660 ]

        ISIS-1448: reinstates the ability to switch component factory for entity collection.

        Prior to 1.12.0 the ComponentFactory SPI was used to lookup the component to render an entity collection, using ComponentType.ENTITY_COLLECTION and passing in an EntityModel with appropriate hints to indicate which collection of the entity to render. The default implementation was EntityCollectionsPanelFactory returning an EntityCollectionsPanel (the plural here is because there many representations of a single collection, with a drop-down selector to choose which).

        In the 1.12.0 (layout XML stuff), this capability was lost: the new Col class simply instantiates EntityCollectionPanel (renamed from EntityCollectionsPanel).

        This commit reinstates the ability by having Col use the ComponentFactoryRegistrar to look up the component to render the entity collection.

        The commit also deletes the CollectionPanelFactory; this code was unused. CollectionPanel is the default table representation of the collection; EntityCollectionPanel simply instantiates it and then keeps track of all the "other" implementations to render the collection. To make this easier to switch in, the code to instantiate a CollectionPanel within EntityCollectionPanel has been moved to a (potentially overridable) factory method.

        Show
        jira-bot ASF subversion and git services added a comment - Commit 53626608c130bea75a471db3f94f750575a0d2f1 in isis's branch refs/heads/master from Dan Haywood [ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=5362660 ] ISIS-1448 : reinstates the ability to switch component factory for entity collection. Prior to 1.12.0 the ComponentFactory SPI was used to lookup the component to render an entity collection, using ComponentType.ENTITY_COLLECTION and passing in an EntityModel with appropriate hints to indicate which collection of the entity to render. The default implementation was EntityCollectionsPanelFactory returning an EntityCollectionsPanel (the plural here is because there many representations of a single collection, with a drop-down selector to choose which). In the 1.12.0 (layout XML stuff), this capability was lost: the new Col class simply instantiates EntityCollectionPanel (renamed from EntityCollectionsPanel). This commit reinstates the ability by having Col use the ComponentFactoryRegistrar to look up the component to render the entity collection. The commit also deletes the CollectionPanelFactory; this code was unused. CollectionPanel is the default table representation of the collection; EntityCollectionPanel simply instantiates it and then keeps track of all the "other" implementations to render the collection. To make this easier to switch in, the code to instantiate a CollectionPanel within EntityCollectionPanel has been moved to a (potentially overridable) factory method.

          People

          • Assignee:
            danhaywood Dan Haywood
            Reporter:
            danhaywood Dan Haywood
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development