Fórumok

JSR 286 Interportlet Communication - any code examples?

thumbnail
David Wainwright, módosítva 16 év-val korábban

JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 23 Csatlakozás dátuma: 2007.09.14. Legújabb bejegyzések
Hallo,

I'm trying to get JSR 286 compliant interportlet communication (event based) working in Lifetray 5.0.1. Does anyone know of (or have) a sample application(s) that run in Liferay?

Thanks in advance,
dwainwr.
thumbnail
Hervé Ménage, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 50 Csatlakozás dátuma: 2007.03.01. Legújabb bejegyzések
Hello,

Please find attached a very simple example: a portlet sends an event, which is listened by the 2nd one.
I am using QNames, and it works fine.

However, some questions remains:
- Is a wiring tool planned ? Required to wire portlets events when we do not have the control on their deployment descriptor.
- How event local names are handled ?
- Is there any way to send events over pages? Sort of action+setEvent+redirect followed by event processing+view on the target page?

Thank you for your help
Regards
Hervé

P.S: rename .ZIP files into .WAR
thumbnail
The Meurwinn Concept, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Expert Bejegyzések: 261 Csatlakozás dátuma: 2006.04.10. Legújabb bejegyzések
Hi, your sample portlets are very nice.

So, it works fine but the problem is that when i click on the submit button, all the page is refresh and not only the portlet.

Do you have any issue about this ?
thumbnail
Hervé Ménage, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 50 Csatlakozás dátuma: 2007.03.01. Legújabb bejegyzések
Thank you, always glad to contribute !

You raised a very interesting question. You are asking if an event submitted by the PublisherPortlet could invoke the ListenerPortlet event processing and render methods only.

Please allow me to give to try to develop a technical answer, although I think we could discuss design (but I'd need more info about what you intend doing). I think it can be an interesting discussion:
- The event is fired by the PublisherPortlet when it processes a request (action or event request) : it is the setEvent() method.
- The publisher portlet state (I mean the business model) might have changed, thus it needs to be rendered,
- The listener portlet receives the event and processes it as a request. Its state may change too, and it needs to be rendered as well.
- Thus it makes sense the portal page is refreshed, and you can use caching mechanisms to optimize the page refresh.

Basically, you would make use of Ajax to handle events. I think the new "resource" mechanism specified by JSR286 is well suited to handle AJAX requests. Unfortunately, you cannot set events on a ResourceResponse object.

Hope this helps,
Regards
Hervé
thumbnail
Richard Youngkin, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 7 Csatlakozás dátuma: 2008.08.26. Legújabb bejegyzések
Hi,

I'm having trouble compiling with the annotations (e.g., @RenderMode) in these examples. What am I (obvious thing :> ) am I missing?

Thanks,
Rich
Michael Weber, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 23 Csatlakozás dátuma: 2008.09.19. Legújabb bejegyzések
Richard Youngkin:
I'm having trouble compiling with the annotations (e.g., @RenderMode) in these examples. What am I (obvious thing :> ) am I missing?


Hi Rich,

I think your problem might be your java version.
Annotations have been introduced in Java 5.0.
Therefore, to use annotations in your code you need at least Java 5.0.

Regards,
Michael Weber
thumbnail
Richard Youngkin, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 7 Csatlakozás dátuma: 2008.08.26. Legújabb bejegyzések
Michael,

I should have been more specific in my post. I actually have java 6, so that base is covered. I'm also using version 5.0.1 of LifeRay, which I had understood to support JSR-286. So the annotation processor should also be available. I'm guessing that my compile classpath isn't configured correctly (i.e., can't find the @RenderMode class that implements the annotation). I'm probably missing something in the LifeRay jar set, but I just can't see what it might be. Googling "LifeRay annotation" doesn't turn up anything useful either.

Thanks,
Rich
thumbnail
Richard Youngkin, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 7 Csatlakozás dátuma: 2008.08.26. Legújabb bejegyzések
Found my problem - I was missing "portlet.jar" from the "Additional Files" link on the current downloads page. I'm not sure how it happened, but the version I had been referencing was missing the annotation processing class for @RenderMode.
Névtelen, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Bejegyzés: 1
Any JSF portlet sample that implements JSR 286 IPC?
thumbnail
ankit yakkundi, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Regular Member Bejegyzések: 221 Csatlakozás dátuma: 2010.03.05. Legújabb bejegyzések
Hi..
I am using Liferay 6 and plugin SDK.
I have created two struts portlet.
I have the following requirement:-

When the user clicks on the link on a portlet A residing on Page A i would like to navigate the user to Page B and portlet B on that page populated.



Is it possible??
I have heard about InterPortlet Communication,but not Inter Portlet-Page Communication..

Any idea,suggestions are welcome..
Thanks in advance.
Snake Syjmick, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 7 Csatlakozás dátuma: 2011.03.22. Legújabb bejegyzések
Any luck with that?
thumbnail
Corné Aussems, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Legend Bejegyzések: 1313 Csatlakozás dátuma: 2006.10.03. Legújabb bejegyzések
in liferay-portlet:actionURL there are 2 attributes that will aid you;

plid = our destination layout id
portletName = your official portletname


<liferay-portlet:actionurl name="searchForm" plid="12345" portletName="foo_WAR_project" var="searchURL" />
aditya sanas, módosítva 12 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 4 Csatlakozás dátuma: 2011.08.22. Legújabb bejegyzések
"Unfortunately, you cannot set events on a ResourceResponse object."

is this achievable now?
can we set events in anyway when we are using ReourceMapping???
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
i tried the portlets posted by Hervé Ménage above (thanks for sharing btw).
They work fine in Sun Web Spaces Server 10, but not in Liferay 5.2.2 in Glassfish 2.

What is so different about these two setups?
Anyone have any idea? thanks in advance!

-jeroen
thumbnail
Manish Kumar Gupta, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 535 Csatlakozás dátuma: 2008.05.16. Legújabb bejegyzések
clean you explain more ...What problem are you facing on Liferay?
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
hi Manish,

Sorry if i wasn't clear enough, i thought maybe this was a known issue.

I get a class cast exception in glassfish2 + liferay 5.2.2 , i don't with Sun web space server 10

this is the exception:


ERROR [jsp:967] java.lang.ClassCastException: mypackage.ContactEvent
java.lang.ClassCastException: mypackage.ContactEvent
	at mypackage.Jsr286EventListenerPortlet.processEvent(Jsr286EventListenerPortlet.java:44)
	at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:152)
	at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:63)
	at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:100)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
	at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:616)
	at com.liferay.portlet.InvokerPortletImpl.invokeEvent(InvokerPortletImpl.java:680)
	at com.liferay.portlet.InvokerPortletImpl.processEvent(InvokerPortletImpl.java:383)
	at com.liferay.portal.action.LayoutAction.processEvent(LayoutAction.java:345)
	at com.liferay.portal.action.LayoutAction.processEvents(LayoutAction.java:396)
	at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:612)
	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:423)
	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:195)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:159)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:505)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:732)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:875)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:143)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:142)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:282)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:417)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:244)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processFilter(OpenSSOFilter.java:73)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:193)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:275)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
	at org.apache.catalina.core.StandardC|#]



This is the processEvent method:

       @ProcessEvent(qname="{http:mycompany.com/events}contactInfo")
	@Override
    public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException {
		// Let's store the event value into the portlet's session (we assume it is never null)
	// line 44:
        mypackage.ContactEvent contactEvent = (mypackage.ContactEvent) request.getEvent().getValue();

        ContactInfoBean contactInfo = new ContactInfoBean();
        contactInfo.setName(contactEvent.getName());
        contactInfo.setEmail(contactEvent.getEmail());
        
        request.getPortletSession().setAttribute("contactInfo", contactInfo);
	}
thumbnail
Manish Kumar Gupta, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 535 Csatlakozás dátuma: 2008.05.16. Legújabb bejegyzések
The ClassCastException comes when you do eventing between 2 portlets deployed in different wars and your payload object (mypackage.ContactEvent) is not in the server class path.

Is this the case with you?
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
Manish Kumar Gupta:
The ClassCastException comes when you do eventing between 2 portlets deployed in different wars and your payload object (mypackage.ContactEvent) is not in the server class path.

Is this the case with you?


Thank you for the explanation!

Yes, they publisher and listener are two wars. How do i place the payload object on the server class path?
thumbnail
Manish Kumar Gupta, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 535 Csatlakozás dátuma: 2008.05.16. Legújabb bejegyzések
You need to create a separate jar for your payload classes and copy it in your server classpath (for example under domains/domain1/lib).
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
Manish Kumar Gupta:
You need to create a separate jar for your payload classes and copy it in your server classpath (for example under domains/domain1/lib).


hi Manish, thanks for the reply. This works.
But is there another way to share the payload object? So that deployment can be done with one file, one war, as opposed to adding one jar to the application server?
(I tried putting the jar in both war's lib folders, but that didn't work.)

PS: i still don't quite understand why seperate payload objects do work in Sun Web Space Server though :S
thumbnail
Manish Kumar Gupta, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 535 Csatlakozás dátuma: 2008.05.16. Legújabb bejegyzések
Ok, here is the trick emoticon.
In your portal-ext.properties, you need to add portlet.container.impl=sun
to work eventing between 2 wars w/o putting jars in the server classpath.
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
Manish Kumar Gupta:
Ok, here is the trick emoticon.
In your portal-ext.properties, you need to add portlet.container.impl=sun
to work eventing between 2 wars w/o putting jars in the server classpath.


hehe, okay, thanks for the trick
i suppose this will break compatibility with JSR-286 ...
is this going to be a topic for a future spec maybe?
thumbnail
Manish Kumar Gupta, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 535 Csatlakozás dátuma: 2008.05.16. Legújabb bejegyzések
Hi Jeroen,

I didn't understood you comment. How will this break compatibility with JSR-286 ?
LR has 2 implementation of portlet container. I was suggesting to switch the container to the one provided by Sun and redeploy your portlets....That's it.
The sun container uses JAXB to pass payload from one portlet to another and that's why no server class path copy is required for payload classes.

Manish.
Jeroen Dierckx, módosítva 15 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 10 Csatlakozás dátuma: 2008.12.11. Legújabb bejegyzések
Manish Kumar Gupta:
Hi Jeroen,

I didn't understood you comment. How will this break compatibility with JSR-286 ?
LR has 2 implementation of portlet container. I was suggesting to switch the container to the one provided by Sun and redeploy your portlets....That's it.
The sun container uses JAXB to pass payload from one portlet to another and that's why no server class path copy is required for payload classes.

Manish.


Ah, okay, i mistakenly assumed switching to another container implementation would break compatibility with JSR286.
My apologies.

Thank you very much for all your help, Manish!
Madhura Raut, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2010.11.11. Legújabb bejegyzések
Hi,
I am facing the same problem.
I have placed the jar of my listner in domain/domain/lib folder but still whenever i invoke the ipc event the following exception is thrown:


[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|14:35:13,683 ERROR [jsp:964] org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
org.portletfaces.bridge.BridgeException: java.lang.ClassCastException: org.portletfaces.bridge.container.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:186)
at org.portletfaces.bridge.GenericFacesPortlet.processEvent(GenericFacesPortlet.java:166)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:86)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:58)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:628)
at com.liferay.portlet.InvokerPortletImpl.invokeEvent(InvokerPortletImpl.java:695)
at com.liferay.portlet.InvokerPortletImpl.processEvent(InvokerPortletImpl.java:390)
at com.liferay.portal.action.LayoutAction.processEvent(LayoutAction.java:458)
at com.liferay.portal.action.LayoutAction.processEvents(LayoutAction.java:509)
at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:796)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:571)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:229)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:152)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:502)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:479)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:288)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:137)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:204)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:871)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:558)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:490)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:382)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:259)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:126)
at com.|#]

[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:204)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:221)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.cache.CacheFilter.processFilter(CacheFilter.java:440)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:45)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:254)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:81)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:179)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:241)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:177)
at com.liferay.portal.servlet.filters.threadlocal.ThreadLocalFilter.processFilter(ThreadLocalFilter.java:35)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:104)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: java.lang.ClassCastException: org.portletfaces.bridge.cont|#]

[#|2011-01-20T14:35:13.683+0530|INFO|sun-appserver2.1|javax.enterprise.system.stream.out|_ThreadID=26;_ThreadName=httpSSLWorkerThread-8080-3;|ainer.liferay.PortletContainerLiferayImpl cannot be cast to org.portletfaces.bridge.container.PortletContainer
at org.portletfaces.bridge.container.PortletContainerFactory.getPortletContainer(PortletContainerFactory.java:39)
at org.portletfaces.bridge.container.PortletContainerFactory.getPortletContainer(PortletContainerFactory.java:56)
at org.portletfaces.bridge.context.ExternalContextImpl.preInitializeObjects(ExternalContextImpl.java:372)
at org.portletfaces.bridge.context.ExternalContextImpl.<init>(ExternalContextImpl.java:135)
at org.portletfaces.bridge.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:57)
at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:89)
at org.portletfaces.bridge.BridgeImpl.getFacesContext(BridgeImpl.java:363)
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:143)
... 175 more
|#]



I am using glassfish v2.1.1 server. please help me.
thumbnail
Neil Griffin, módosítva 12 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
FWIW, I saw this happen today when the following was present in the WEB-INF/liferay-portlet.xml descriptor:

<private-request-attributes>false</private-request-attributes>


According to the Liferay FAQ Wiki page:

"This method can possibly result in a ClassCastException (especially for multiple portlets in multiple WARs) and is therefore not recommended"
Madhura Raut, módosítva 12 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2010.11.11. Legújabb bejegyzések
Hi Neil,

Is their any way to provide webcast and video file upload and preview (*.avi, *.mov, *.wmv) in liferay 6.0.6?
Ruchi Agrawal, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 3 Csatlakozás dátuma: 2010.01.20. Legújabb bejegyzések
Hi Manish,
I had downloaded the Inter Portlet example which Herve had posted. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi
thumbnail
sasi kala, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 4 Csatlakozás dátuma: 2010.01.20. Legújabb bejegyzések
Hi Manish,
I had downloaded the Inter Portlet example... It was very helpful...
I am very new to the Liferay portal development.

I need to implement the Inter Portlet Communication example....
I am using Liferay5.2.3 with Tomcat 6.0.18.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.
thank u
thumbnail
satya jangala, módosítva 12 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 8 Csatlakozás dátuma: 2010.11.08. Legújabb bejegyzések
Manish Kumar Gupta:
clean you explain more ...What problem are you facing on Liferay?



hi manish,

please help me , how create the lar file and how the ipc... if u have the code please send me jangala.satya143@gmail.com


thanks in advance
satya
jsd jsd, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 24 Csatlakozás dátuma: 2006.05.18. Legújabb bejegyzések
Your example doesn't appear to be jsr-286 as I understand it. It was possible to communicate between portlets in jsr-168. In order for it to be jsr-286 it has to be ajax, thus your "submit" button won't do it. It needs to be a plain old input "button" that fires off an ajax request.
whyBish valid, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 63 Csatlakozás dátuma: 2009.07.10. Legújabb bejegyzések
http://blog.xebia.com/2009/04/19/inter-portlet-coordination-with-jsr-286/

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Inter-portlet+communication
thumbnail
Giri P, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Regular Member Bejegyzések: 137 Csatlakozás dátuma: 2009.08.20. Legújabb bejegyzések
Hi herve,
Thanks for providing a good example on jsr 286.
I'm trying to execute these two portlets.
for that i ahve been created war files and deploying themm into deploy directory of liferay.
And able to add in my pages successfully, but these two portlets are showing an empty pages in stead of the view.jsp

even i tried with doView() method instead of your doNormal()

Note: I'm giving the right url for view.jsp in the above methods.

Any help?

Regards,
Giri
thumbnail
Jonas Yuan, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Liferay Master Bejegyzések: 993 Csatlakozás dátuma: 2007.04.27. Legújabb bejegyzések
Hi Giri,

You can find JSR 286 IPC example at

Code Download

Chapter 2 and Chapter 10 give details of customization and development from
Liferay Portal 5.2 Systems Development

Hope that it helps.

Thanks

Jonas Yuan
-----------------
The Author of Liferay Books:
Liferay Portal 5.2 Systems Development
Liferay Portal Enterprise Intranets
Ruchi Agrawal, módosítva 14 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 3 Csatlakozás dátuma: 2010.01.20. Legújabb bejegyzések
Hi Herve,

Thanks for posting the IPC code. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi
Pankaj Sinha, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 29 Csatlakozás dátuma: 2010.04.26. Legújabb bejegyzések
Ruchi Agrawal:
Hi Herve,

Thanks for posting the IPC code. It was very helpful.
I am very new to the Liferay portal dev.

I need to implement the IPC example in my existing framework.
I am using Liferay5.2.3 with Tomcat 5.5.28.

I did deploy and added the portlet example you posted on my liferay but
the page is empty.
There is no JSP showing up. I tried to check my JSP path but could not find anything wrong.

What could be the issue?

Can you please help me resolve the problem.

Thanks!
-Ruchi


Hi Ruchi,

Just go thru the word doc attached and u'll find a simple way for IPC, Its working...

Thanx & Regards,
Pankaj

Mellékletek:

thumbnail
charles de courval, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 55 Csatlakozás dátuma: 2010.07.31. Legújabb bejegyzések
Thanks for the explanation on IPC for portlet that reside on the same page.

The problem that I have is IPC between portlet that reside on 2 different page where action on one portlet of one page would result in an other page displaying the results in its portlet. I'm successful in having the other portlet reaction to the event, but the page associated with it is never displayed.

In more details:

I have a page which contains one portlet that display a list of items­. This page is called PRODUCTS.
I have a hidden page called DETAILS which contains one portlet that displays the product details.
What I wish is that when I click on a product on the list, I want to be redirected to the DETAILS page and have that products details displayed.

I'm was successful in having the details portlet act on the display event, but it never redirect the user to the DETAILS page.

I did found this configuration in portlet-ext.xml, portlet.event.distribution = layout-set, that allow portlet not on a page to listen to an event.

But I'm missing something to make the responding portlet display its information.

So, what am i missing ?

thanks
Deepak Kenchamba, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

New Member Bejegyzések: 3 Csatlakozás dátuma: 2010.10.12. Legújabb bejegyzések
Portlet1-portlet.war

portlet.xml

[size=5]<portlet-app version="2.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
        http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
	
        <portlet>
		<portlet-name>Portlet1</portlet-name>
		<display-name>Portlet1</display-name>
                .........
		<supported-publishing-event>
			<qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
		</supported-publishing-event>
	</portlet>
	<event-definition>
		<qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
		<value-type>java.lang.String</value-type>
	</event-definition>
</portlet-app>[/size]


JSP Page

[size=5]<portlet:actionurl var="fireEvent">
	<portlet:param name="action" value="getDocumentDetails" />
	<portlet:param name="documentId" value="126" />
</portlet:actionurl>
<a href="${fireEvent}">here</a>[/size]


Handler Method (in Controller class)

[size=5]@ActionMapping(params = "action=getDocumentDetails")
	public void getDocumentDetails(ActionRequest request,
			ActionResponse response, ModelMap map,
			@RequestParam String documentId) {
		System.out.println(" documentId := " + documentId);
		try {
			System.out.println("Sender Application ");
			QName eventName = new QName("http://code.kenchamba.com",
					"testevent");
			response.setEvent(eventName, documentId);

		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}[/size]



Portlet2-portlet.war

portlet.xml

[size=5]<portlet-app version="2.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
        http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
	<portlet>
		<portlet-name>Portlet2</portlet-name>
		<display-name>Portlet2</display-name>
                ............
                <supported-processing-event>
			<qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
		</supported-processing-event>
	</portlet>
	<event-definition>
		<qname xmlns:n="http://code.kenchamba.com">n:testevent</qname>
		<value-type>java.lang.String</value-type>
	</event-definition>
</portlet-app>[/size]


Handler Method (in Controller class)

[size=5]@EventMapping("testevent")
	public void testReceiverEvent(EventRequest request,
			EventResponse eventResponse, ModelMap map) {
		Event event = request.getEvent();

		System.out.println("testReceiverEvent");

		if (event.getName().equals("testevent")) {
			String documentId = (String) event.getValue();
			System.out.println("documentId=" + documentId);
		}
	}[/size]
Sid L, módosítva 13 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Junior Member Bejegyzések: 28 Csatlakozás dátuma: 2010.12.03. Legújabb bejegyzések
any working solution to this?
thumbnail
Mani kandan, módosítva 12 év-val korábban

RE: JSR 286 Interportlet Communication - any code examples?

Expert Bejegyzések: 492 Csatlakozás dátuma: 2010.09.15. Legújabb bejegyzések
Hi guys,
Here you can find the examples of this solution with ajax link