Foren

Referencing EditUserMVCActionCommand

Samson HRIT, geändert vor 7 Jahren.

Referencing EditUserMVCActionCommand

New Member Beiträge: 5 Beitrittsdatum: 24.10.16 Neueste Beiträge
Hello,
I'm facing an issue while trying to override
com.liferay.users.admin.web.portlet.action.EditUserMVCActionCommand
:

I created a component with the same name and the same mvc command name, and got a Reference to the original actionCommand, everything works like a charm when in the Users Admin portlet.

Now, when using the My Account portlet to modify one's own profile, an other MVCActionCommand steps in, it's called
com.liferay.my.account.web.internal.portlet.action.EditUserMVCActionCommand
and it extends the Users Admin one.

The My Account MVCActionCommand calls the Users Admin one through a call to super(), so I created another Component that extends my custom Users Admin EditUserMVCActionCommand, and it mimics the original behaviour .

But, while everything goes smoothly until now, here's my issue : the reference i get in my custom Users Admin EditUserMVCActionCommand is null when called from the My Account portlet.

Here is the code i used to get the reference :
@Reference(unbind = "-",
			target = 
			"(component.name=com.liferay.users.admin.web.portlet.action.EditUserMVCActionCommand)"
		)
	public void setSuperActionCommand(MVCActionCommand superActionCommand) {
		      this.superActionCommand = superActionCommand;
		    }
	protected MVCActionCommand superActionCommand;


To sum up, saving a user from the Users Admin portlet does call my custom MVCActionCommand, and the reference to the original command is indeed injected, but when saving from the My account portlet the custom MVCActionCommand does not resolve the original command.

How can I get this Reference to work ? I suppose i'm missing something but I can't find what.
Any help would be appreciated

Samson
Samson HRIT, geändert vor 7 Jahren.

RE: Referencing EditUserMVCActionCommand

New Member Beiträge: 5 Beitrittsdatum: 24.10.16 Neueste Beiträge
Anyone has a guess about why the Reference isn't getting injected when the calling portlet is the MyAccount one ? It would be a life saver !
Samson HRIT, geändert vor 7 Jahren.

RE: Referencing EditUserMVCActionCommand

New Member Beiträge: 5 Beitrittsdatum: 24.10.16 Neueste Beiträge
Really no one ? ;_;