[jira] [Closed] (PLUTO-704) PortletV3Demo RedirectPortlet has incomplete/non-validating definition in portlet.xml

"Neil Griffin (JIRA)" <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/PLUTO-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin closed PLUTO-704.
------------------------------
    Resolution: Fixed
      Assignee: Neil Griffin  (was: Scott Nicklous)

Fixed in commit [8896f51e129bd4fdc9a0a3b0dd5a9e91204b949c|https://github.com/apache/portals-pluto/commit/8896f51e129bd4fdc9a0a3b0dd5a9e91204b949c].

> PortletV3Demo RedirectPortlet has incomplete/non-validating definition in portlet.xml
> -------------------------------------------------------------------------------------
>
>                 Key: PLUTO-704
>                 URL: https://issues.apache.org/jira/browse/PLUTO-704
>             Project: Pluto
>          Issue Type: Improvement
>          Components: demo portlets
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Neil Griffin
>            Priority: Major
>             Fix For: 3.0.1
>
>
> 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:
> {code:java|title=RedirectPortlet.java}
> @PortletConfiguration(portletName="V3RedirectPortlet")
> public class RedirectPortlet extends GenericPortlet {
>     ...
> }
> {code}
> But it is also registered in the the portlet.xml descriptor:
> {code:xml|title=portlet.xml}
>    <portlet>
>       <portlet-name>V3RedirectPortlet</portlet-name>
>       <portlet-info>
>          <title>Redirect Test Portlet</title>
>       </portlet-info>
>    </portlet>
> {code}
> 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:
> {code:java|title=RedirectPortlet.java}
> @PortletConfiguration(
>       portletName="V3RedirectPortlet",
>       title = @LocaleString(value = "Redirect Test Portlet"))
> public class RedirectPortlet extends GenericPortlet {
>     ...
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.