-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Fix Version/s: 7.0.x
-
Component/s: Core Infrastructure
-
Labels:None
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.