Patrick Gill wrote:
Hi Ate and Charly,
I'm working on the same thing. I'm currently using Liferay's implementation
for ServletContextProvider
(com.liferay.util.bridges.struts.LiferayServletContextProviderWrapper) .
Ate Douma wrote:
- in the LiferayToPortalBridgePortletResourceURLFactory you seem to simply
generate a Portlet RenderURL for the ResourceURL.
How can that ever work? I would assume Liferay is going to render a
full page for such a request and not just the output of
the targetted portlet (with full control over its response).
Sorry, that is probably my fault. I was trying to create an implementation
of PortletResourceURLFactory for Liferay since there isn't one currently. I
based it on the svn commit I found on here:
http://www.nabble.com/svn-commit%3A-r543172----portals-jetspeed-2-trunk-commons-src-java-org-apache-jetspeed-portlet-PortletResourceURLFactoryImpl.java-tf3847355.html#a10896778
That was my initial attempt at it.
For Jetspeed, I have much improved/simplyfied this after I added ResourceURL handling natively to the portal (internally), and I only need to set a predefined
flag/parameter to tell it to use it (instead of creating a plain RenderURL which simply won't do):
public class PortletResourceURLFactoryImpl implements
PortletResourceURLFactory
{
/*
* (non-Javadoc)
*
* @see
org.apache.portals.bridges.common.PortletResourceURLFactory#createResourceURL(javax.portlet.PortletConfig,
* javax.portlet.RenderRequest, javax.portlet.RenderResponse,
* java.util.Map)
*/
public String createResourceURL(PortletConfig config, RenderRequest
request, RenderResponse response, Map parameters)
throws PortletException
{
PortletURL url = response.createRenderURL();
if (parameters != null)
{
url.setParameters(parameters);
}
url.setParameter(PortalReservedParameters.PORTLET_RESOURCE_URL_REQUEST_PARAMETER,
"");
return url.toString();
}
}
But I'm not sure about how Liferay has done its implementation, so it's been
severely reduced. I couldn't see any methods for creating a ResourceURL...
Well, you'll have to check the Liferay portal/container internals for it as it must be told not to create a plain RenderURL (as your current implementation
does) but instead switch to this pre-JSR-286 ResourceURL handling. How to do that (if it is already supported) I can't tell you as I don't know anything about
Liferay's internals.
Anyway, I've opened an issue regarding implementation at:
http://support.liferay.com/browse/LEP-3873
No reply so far, unfortunately. I've also asked for some help on the Liferay
forums:
http://www.liferay.com/web/guest/community/forums/message_boards/message/169952
But again, no reply. At the moment this is the main issue holding me back.
Well, yes. Without the ResourceURL support you're out of luck I'm afraid. I
suggest just keep pinging the Liferay devs (maybe they use IRC?).
Good luck
Ate
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]