Foros de discusión

PortletURLImpl cannot be resolved to a type

thumbnail
devi nimmagadda, modificado hace 12 años.

PortletURLImpl cannot be resolved to a type

Regular Member Mensajes: 109 Fecha de incorporación: 9/12/10 Mensajes recientes
Hi,

I am developing struts plugin portlet.


PortletURL viewURL = new PortletURLImpl(request, "36", 10237, "RENDER_PHASE");
viewURL.setWindowState(WindowState.MAXIMIZED);
viewURL.setParameter("struts_action", "/wiki/view");
viewURL.setParameter("nodeName", String.valueOf(newsLetter.getTitle()));

When I am creating portleturl , I am getting below exception :

PortletURLImpl cannot be resolved to a type :::

Only a type can be imported. com.liferay.portlet.PortletURLImpl resolves to a package An error occurred at line: 468



How can I resolve this issue.

Thanks in advance...
thumbnail
jelmer kuperus, modificado hace 12 años.

RE: PortletURLImpl cannot be resolved to a type

Liferay Legend Mensajes: 1191 Fecha de incorporación: 10/03/10 Mensajes recientes
Use PortletURLFactoryUtil instead of directly instantiating PortletURLImpl, like this

 PortletURL viewURL = PortletURLFactoryUtil.create(request, "36", 10237, "RENDER_PHASE");


PortletURLImpl is in portal-impl.jar so you cannot access it from sdk portlets
thumbnail
devi nimmagadda, modificado hace 12 años.

RE: PortletURLImpl cannot be resolved to a type

Regular Member Mensajes: 109 Fecha de incorporación: 9/12/10 Mensajes recientes
hi,

Thanks for your reply.

It works fine.