Fórumok

How to import a class in hook

asdsad asdadasd, módosítva 8 év-val korábban

How to import a class in hook

New Member Bejegyzések: 23 Csatlakozás dátuma: 2015.07.23. Legújabb bejegyzések
My question is simple: how to import com.liferay.portlet.login.action.ForgotPasswordAction in an Action class in a hook.
The error I get is The import com.liferay.portlet.login cannot be resolved.
thumbnail
Olaf Kock, módosítva 8 év-val korábban

RE: How to import a class in hook

Liferay Legend Bejegyzések: 6403 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
The answer is simple as well: You can't. ForgotPasswordAction is in portal-impl.jar, which is inaccessible for Hooks. Just in case you think about adding that file to the classpath: Don't - it won't work and introduce all kinds of other problems.

Now if you told us what you want to achieve, we might provide a solution to your underlying problem. The solution that you thought of (importing ForgotPasswordAction) doesn't work.
thumbnail
David H Nebinger, módosítva 8 év-val korábban

RE: How to import a class in hook

Liferay Legend Bejegyzések: 14918 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Sometimes the way to get to Liferay classes is to use reflection. Alternatively the PortalBeanLocator can give access to portal beans.