Foren

Can not access class in ext-impl from plugin

xun ren, geändert vor 13 Jahren.

Can not access class in ext-impl from plugin

Junior Member Beiträge: 81 Beitrittsdatum: 01.04.08 Neueste Beiträge
Hi all,
I am trying to create a taglib in liferay. The tag handler is named PageNavigationTag which extends the IncludeTag class. However, after I put my newly created tag handler in the ext-impl and re-deploy my project and start my tomcat and access to this tag through one of my JSP pages in plugin, there is an exception:
Unable to load tag handler class "fr.ippon.sel.taglib.util.PageNavigationTag" for tag "page:navigation"
.

There are three things we should concern on:
1. Because I want to use this tag in several portlets in the plugin project. So I have to put the tag handler in the ext project instead of put it in a specific portlet. So my question is why I can not access to the class in ext-impl

2. If I put it in ext-service, normally, it will be deployed within the ext-service.jar. Sounds nice, but in ext-service, we can not access to IncludeTag of liferay when deploy with ant. This is another question: why we can not access to liferay's classes within ext-service.

3. I also tried to create a new project which contains only the tag handler, and I packaged this project as a jar and included it in the ext project and deployed it to tomcat. In the plugin, I still can not load this tag handler in the runtime.

Please give some suggestions or tell me how can I create a custom tag in my liferay.
thumbnail
Samuel Kong, geändert vor 13 Jahren.

RE: Can not access class in ext-impl from plugin

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
This is the expected behavior.

ext-impl is for extending portal-impl.

portal-impl is the impl for the portal and not a part of the API. Since it's not a part of the API, it is not available to plugins.
thumbnail
Sandeep Nair, geändert vor 13 Jahren.

RE: Can not access class in ext-impl from plugin

Liferay Legend Beiträge: 1744 Beitrittsdatum: 06.11.08 Neueste Beiträge
Yes,

Thats the ideal way it should be. If you still want to use it, you can use PortalClassInvoker or PortletClassInvoker.

Regards,
Sandeep
thumbnail
Jim Klo, geändert vor 13 Jahren.

RE: Can not access class in ext-impl from plugin

Junior Member Beiträge: 75 Beitrittsdatum: 07.11.08 Neueste Beiträge
Can't you just add the following to your liferay-plugin-package.properties within your Plugin?

portal-dependency-jars=ext-impl.jar


I've done this and had not many issues accessing the classes in the EXT.

The only thing I've run into, so far has to do with static singletons. I'm having a problem getting the plugin to modify singleton managed by a static class method.