Uploaded image for project: 'PUBLIC - Liferay Documentation'
  1. PUBLIC - Liferay Documentation
  2. LRDOCS-3611

Overriding MVC Commands article has incorrect reference

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 7.0.x
    • Component/s: Core Infrastructure
    • Labels:
      None

      Description

      In the tutorial for Overriding MVC Commands, the tutorial mentions to make a reference to the original MVC Command as follows:

      @Reference(
          target = "(&(mvc.command.name=/blogs/edit_entry)(javax.portlet.name= + BlogsPortletKeys.BLOGS_ADMIN + "))")
      protected MVCRenderCommand mvcRenderCommand;
      

      However, this reference will fail after several redeploys, because there will be a circular reference - the new MVC Command has the same mvc.commmand.name and javax.portlet.name as the reference command.

      Instead, I talked to another Liferay employee who suggested to use

      @Reference(
          target = "(component.name=<original_mvc_command_classname>)")
      

      This direct reference to the component's classname will ensure that the original MVC command is used.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.0.x