Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-116034

As a Developer I can implement a service, InfoItemFormVariationsProvider, to declare the form variations for an InfoItem type



      Some types of entity, such as web content articles (JournalArticle) and documents (DLFileEntry) provide the ability to dynamically define different "subtypes" each with a different subset of fields. Liferay has traditionally added some methods to multi-purpose frameworks such as the Asset Framework or ClassType to allow developers to declare these different subtypes. However when those frameworks are not really needed, it's very cumbersome to have to implement them just to declare the subtypes.

      The goal of this story is to provide a small and single purpose abstraction that allows developers to provide a list of form variations that a specific custom type has. The concept of "form variation" encapsulates in a more precise way what end users might refer as subtype, since the difference among subtypes is precisely that a certain subtype of the entity has a different subset of fields in its form.

      This story also includes changing they way field mapping in fragment-based pages works to leverage the new Forms Variation Provider, making it easier for 3rd party developers to expose their subtypes for mapping. Because of this, the following testing is necessary to ensure that the mapping feature works as usual after these changes:

      • Display Page Templates
        • On creation, it should be possible to select any of the registered types of content (Blogs Entry, Document and Web Content Article out of the box) and their subtypes (for Document and Web Content Article)
        • When editing the template, the fields of the selected type and subtype are available for mapping
      • Fragment Field Mapping
        • When selecting a specific content to map to a fragment editable, the list of fields show the custom fields of the types and subtypes of the content item.
        • When using Collection Display fragment, with "Grid" list style and adding fragments to a cell to map them to fields, , the list of fields show the custom fields of the types and subtypes of the content item.

      Test Scenarios

      Test Scenarios Test Strategy Kind of test Is it covered by FrontEnd ? (JS-Unit) Is it covered by BackEnd ? (unit or integration) Could it be covered by POSHI?
      The contributed content types and their subtypes are available when creating a display page template Critical Manual No No Yes
      The associated custom subtypes and ddmfields are available for mapping in display page template High Manual No Yes Yes
      The custom ddmfields of content are available for mapping in editable field High Manual No No Yes
      The custom ddmfields of single type collection items are available for mapping in editable field High Manual No No Yes


        Issue Links



              manoel.cyreno Manoel Cyreno
              jorge.ferrer Jorge Ferrer (Inactive)
              SE Support SE Support
              Kiyoshi Lee Kiyoshi Lee
              0 Vote for this issue
              0 Start watching this issue




                  Version Package