Details

      Description

      Create a *MVCActionCommand class to import the file:

      • See AddDataDefinitionMVCActionCommand.java as example;
      • Retrieve from request:
        • File;
          • Extract from file:
            • Data Definition (that needs to be transformed to DTO);
            • Data Layout (that needs to be transformed to DTO);
        • Name:
          • Set the name map (the map will contain just one language - site content’s default language) in the dataDefinition DTO;
      • Call:
        • Make sure the groupId is available in the request object. If not, include in the frontend request (retrieved from the ThemeDisplay);
        • dataDefinitionResource.postSiteDataDefinitionByContentType(groupId, "journal", dataDefinition);
      • Create an exception for failed import. We don't need an exception to show an error message. We're using the attribute key of the tag liferay-ui:error instead.
      • Catch any exception and throw the new exception add the session error (SessionErrors.java) in case of import error;
      • Add the exception error message in view_ddm_structure.jsp
      • Add the success message in view_ddm_structure.jsp and add the key in the SessionMessages.java in case it doesn’t throw exception:
        • Ex: modules/apps/staging/staging-processes-web/src/main/resources/META-INF/resources/processes_list/view.jsp
        • Ex: StagingProcessesPortlet.java

        Attachments

          Activity

            People

            Assignee:
            team-echo Product Team Echo
            Reporter:
            marcela.cunha Marcela Cunha
            Recent user:
            Sophia Zhang
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              19 weeks, 6 days ago

                Packages

                Version Package
                7.4.2 CE GA3 DXP 7,4
                7.4.13 DXP GA1
                Master