Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-704

PortletV3Demo RedirectPortlet has incomplete/non-validating definition in portlet.xml

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1
    • demo portlets
    • None

    Description

      It is possible to register a portlet both with @PortletConfiguration and in portlet.xml, but the registration definition in portlet.xml will take precedence. For example, the PortletV3Demo has a portlet definition registered via annotation:

      RedirectPortlet.java
      @PortletConfiguration(portletName="V3RedirectPortlet")
      public class RedirectPortlet extends GenericPortlet {
          ...
      }
      

      But it is also registered in the the portlet.xml descriptor:

      portlet.xml
         <portlet>
            <portlet-name>V3RedirectPortlet</portlet-name>
            <portlet-info>
               <title>Redirect Test Portlet</title>
            </portlet-info>
         </portlet>
      

      The problem is that the XML definition is incomplete/non-validating since it does not contain a <supports>...</supports> element.

      Since the demo portlet does not seem to be testing whether or not portlet.xml takes precedence, the proposed solution would be to remove incomplete/non-validating definition from portlet.xml and specify the portlet title in the annotation:

      RedirectPortlet.java
      @PortletConfiguration(
            portletName="V3RedirectPortlet",
            title = @LocaleString(value = "Redirect Test Portlet"))
      public class RedirectPortlet extends GenericPortlet {
          ...
      }
      

      Attachments

        Activity

          People

            ngriffin7a Neil Griffin (Inactive)
            ngriffin7a Neil Griffin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: