Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-2236

Label of subapps is ignored

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Neutral
    • 5.1.1
    • 5.1
    • None
    • None

    Description

      Version number : 5.1 (Snapshot: 2013.10.04 08:02:58)
      Build          : 4. October 2013 (rev. a33e11d74c2fa8d08268293854dd38e7556a35f3)
      Edition        : Enterprise Edition
      

      Steps to reproduce:

      • go to configuration/modules/about-app/apps/about/subApps/main
      • add property label and set its value
      • open about app
      • label hasn't changed to the one defined in the subapp

      See also attached screenshots.

      Debugging leads to the getCaption() method in the info.magnolia.ui.framework.app.BaseSubApp.

          /**
           * This method will try to determine the current sub app caption, the one usually displayed in the tab where the subapp opens.
           *
           * @return the configured label for this subapp. If no label is found in the subapp configuration, it will try to use the label from the parent app.
           *         If the latter is missing too, it will return an empty string.
           */
          @Override
          public String getCaption() {
              String label = subAppContext.getSubAppDescriptor().getLabel();
              if (StringUtils.isNotBlank(label)) {
                  return label;
              }
              label = subAppContext.getAppContext().getLabel();
              if (StringUtils.isNotBlank(label)) {
                  return label;
              }
              log.warn("No label could be found for sub app [{}] in app [{}]", subAppContext.getSubAppDescriptor().getName(), subAppContext.getAppContext().getName());
              return "";
          }
      

      String label = subAppContext.getSubAppDescriptor() returns proxied subapp descriptor that then returns label of the main app, not subapp (btw getLabel() method in the subapp gets invoked and returns correct label).

      Checklists

        Acceptance criteria

        Attachments

          1. m01.png
            m01.png
            33 kB
          2. m02.png
            m02.png
            6 kB

          Issue Links

            Activity

              People

                jchocholacek Jozef Chocholacek
                jsimak Jaroslav Simak
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD