Letzte Blogger

Nate Cavanaugh

Staff
37 Nachrichten
17. September 2014

Vicki Lea Tsang

Staff
5 Nachrichten
11. September 2014

Martin Yan

Staff
6 Nachrichten
10. September 2014

Angela Wu

Staff
3 Nachrichten
8. September 2014

Máté Thurzó

Staff
3 Nachrichten
8. September 2014

Mohit Soni

Staff
2 Nachrichten
4. September 2014

Matti Tahvonen

4 Nachrichten
2. September 2014

Jorge Ferrer

Staff
57 Nachrichten
29. August 2014

Olaf Kock

Staff
78 Nachrichten
26. August 2014

Ronald Sarayudej

Staff
151 Nachrichten
25. August 2014
« Zurück

Liferay 6: OpenSocial Gadgets

Company Blogs 3. Juni 2010 Von Michael Young Staff

 Liferay 6 will feature an OpenSocial container based on Shindig. OpenSocial Gadgets present as first-class citizens via the "Add Application" menu, just like portlets.

To configure a Gadget in Liferay, all you need is the Gadget URL. In the screenshots below I've configured three gadgets:

  1. http://www.labpixies.com/campaigns/todo/todo.xml
  2. http://www.google.com/ig/modules/horoscope.xml
  3. http://localhost:8080/opensocial-portlet/gadgets/files/samplecontainer/examples/SocialHelloWorld.xml (this is a sample Shindig gadget)

 

 

Antworten im Thread Autor Datum
Nice feature. Thank you, Michael! Jonas Yuan 3. Juni 2010 17:53
Micheal, thanks for the info. Where does the... Philip Buckley 3. Juni 2010 18:06
Hi Philip, the portlet opensocial-portlet has... Jonas Yuan 4. Juni 2010 14:32
Philip, App data is saved via Expando on a per... Michael Young 4. Juni 2010 14:35
Nice feature! :) Are open social gadgets for... Jader Francia 3. Juni 2010 22:12
Hi Jader, open social gadgets are... Jonas Yuan 4. Juni 2010 14:35
Go go gadget Shepherd Ching 5. Juni 2010 16:47
I have downloaded LR 6 Beta CE, logged in as... Tony Rogers 7. Juni 2010 08:49
Hi Tony, you need deploy opensocial portlet... Jonas Yuan 7. Juni 2010 09:05
Really nice feature. I just testing it and... Carlos Vicente 8. Juni 2010 08:07
Carlos, Thanks for checking that out. We're... Michael Young 8. Juni 2010 09:01
Just testing some copy&paste examples. I... Carlos Vicente 8. Juni 2010 11:16
Gadgets now running in LifeRay :-) However... Tony Rogers 8. Juni 2010 10:22
the same problem than Tony, when you restart... unai alba 16. Juni 2010 07:16
I'm testing in Liferay 6 RC2. the message is... unai alba 16. Juni 2010 07:20
Hi Unai, thanks. This is a bug. I can reproduce... Jonas Yuan 16. Juni 2010 07:27
I want to add a gadget dinamically from another... Cesar William 17. Juni 2010 06:50
Very nice and interesting feature . Thank You :) Bavithra Rajendran 18. Juni 2010 04:02
Does this gadget work on Liferay 6.0 ? Because... Julien Leray 9. Juli 2010 13:06
I deployed the opensocial-portlet-6.0.2.1.war... Kamal Pasha Shaikh 6. Oktober 2010 09:59
Possibly a dumb question but I have been... Ryan Terwedo 14. Juni 2011 15:33
I created an OpenSocial gadget (6.0.6.1) with... Long N. 5. August 2011 06:58
Has anyone integrated Jira and Liferay using... Kicha p 28. Februar 2012 03:44
Only the todo list is still working do you have... Sharmila Wijeyakumar 27. März 2014 21:32

Gepostet am 03.06.10 17:53.
Micheal, thanks for the info. Where does the data get saved when you use the new Gadget feature in Liferay?
Gepostet am 03.06.10 18:06 als Antwort auf Jonas Yuan.
Nice feature! emoticon
Are open social gadgets for portal instance or portal wide, like themes?
Gepostet am 03.06.10 22:12.
Hi Philip, the portlet opensocial-portlet has its own database table to save the data (name and URL) as

create table OpenSocial_Gadget (
gadgetId LONG not null primary key,
companyId LONG,
createDate DATE null,
modifiedDate DATE null,
name VARCHAR(75) null,
url STRING null
);

Hope that it helps,

Thanks

Jonas
Gepostet am 04.06.10 14:32 als Antwort auf Philip Buckley.
Philip,

App data is saved via Expando on a per user / per app basis.
Gepostet am 04.06.10 14:35 als Antwort auf Philip Buckley.
Hi Jader, open social gadgets are portal-instance wide, since company-Id is one of fields. right?
Gepostet am 04.06.10 14:35 als Antwort auf Jader Francia.
I have downloaded LR 6 Beta CE, logged in as Bruno, but do not see this feature. Am I missing something ?

Thanks
Gepostet am 07.06.10 08:49.
Hi Tony, you need deploy opensocial portlet first.

You can find the portlet (opensocial-portlet-6.0.2.1.war) at http://liferay.cignex.com/palm_tree/book/0387/chapter12/.

Hope that it helps,

Thanks
Gepostet am 07.06.10 09:05 als Antwort auf Tony Rogers.
Really nice feature. I just testing it and seems to work out of the box.
Well, i tried changing the view, and seems that feature is not yet available. do you have plans for his feature?
Gepostet am 08.06.10 08:07.
Carlos,

Thanks for checking that out. We're going to implement the views very soon. Which gadget(s) are you testing with?
Gepostet am 08.06.10 09:01 als Antwort auf Carlos Vicente.
Gadgets now running in LifeRay :-) However they are removed when LifeRay is restarted. The portlet frame is left behind with following message in the content area:

'This portlet has been undeployed. Please redeploy it or remove it from the page.'
Gepostet am 08.06.10 10:22.
Just testing some copy&paste examples.

I testing OpenSocial because i'm thinking about to integrate a .NET application with strong AJAX background an OpenSocial fits nicelly with that kind of integration.

It would be desirable also, the possibility available on regular portlets of redirect the view change to another page.

Really, i think that Liferay becames a OpenSocial container gives it a great future. OpenSocial overlaps in many ways Portlet specification, but the development lifecicle is fas simple. I'm really excited about it.
Gepostet am 08.06.10 11:16 als Antwort auf Michael Young.
the same problem than Tony, when you restart the server the gadget dissapear from the add menu and the portlet is not available in the pages.
Gepostet am 16.06.10 07:16.
I'm testing in Liferay 6 RC2. the message is "Portlet is temporarily unavailable." and a nullpointer appears in the console.
Gepostet am 16.06.10 07:20 als Antwort auf unai unai.
Hi Unai, thanks. This is a bug. I can reproduce the same. You may report this in JIRA.
Gepostet am 16.06.10 07:27 als Antwort auf unai unai.
I want to add a gadget dinamically from another application. What is the better way to do it?
Gepostet am 17.06.10 06:50.
Very nice and interesting feature . Thank You emoticon
Gepostet am 18.06.10 04:02.
Does this gadget work on Liferay 6.0 ? Because I can't use it on my Liferay's version....
Gepostet am 09.07.10 13:06 als Antwort auf Bavithra Rajendran.
I deployed the opensocial-portlet-6.0.2.1.war file (from the download link posted by @Jonas) on my liferay-6.0.4 bundled installation. I got the following error message in my server log. Sorry, I have to paste the log file content as I cannot attach it in the post.

16:31:10,623 INFO [AutoDeployDir:167] Processing opensocial-portlet-6.0.2.1.war
16:31:11,124 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.util.zip.ZipException: error in opening zip file
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.util.zip.ZipException: error in opening zip file
at com.liferay.portal.kernel.deploy.auto.BaseAutoDeployListener.isMatchingFile(Base­AutoDeployListener.java:76)
at com.liferay.portal.kernel.deploy.auto.BaseAutoDeployListener.isHookPlugin(BaseAu­toDeployListener.java:40)
at com.liferay.portal.deploy.auto.HookAutoDeployListener.deploy(HookAutoDeployListe­ner.java:38)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.ja­va:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.­java:221)

at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.ja­va:49)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.zip.ZipFile.<init>(ZipFile.java:131)
at com.liferay.portal.kernel.deploy.auto.BaseAutoDeployListener.isMatchingFile(Base­AutoDeployListener.java:61)
... 5 more
16:31:21,126 INFO [AutoDeployDir:172] Processing opensocial-portlet-6.0.2.1.war. This is attempt 2.

16:31:21,126 INFO [PortletAutoDeployListener:71] Copying portlets for C:\liferay-portal-6.0.4\deploy\opensocial-portlet-6.0.2.1.war
Expanding: C:\liferay-portal-6.0.4\deploy\opensocial-portlet-6.0.2.1.war into C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298
Copying 1 file to C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298\WEB-INF
Copying 1 file to C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298\WEB-INF\classes
Copying 1 file to C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298\WEB-INF\classes
Copying 1 file to C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298\META-INF
Copying 145 files to C:\liferay-portal-6.0.4\tomcat-6.0.26\webapps\opensocial-portlet
Copying 1 file to C:\liferay-portal-6.0.4\tomcat-6.0.26\webapps\opensocial-portlet
Oct 6, 2010 4:31:46 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Reloading context [/opensocial-portlet]
Deleting directory C:\liferay-portal-6.0.4\tomcat-6.0.26\temp\20101006163121298
16:31:46,757 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:31:46,788 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:31:46,929 INFO [ExtHotDeployListener:205] Extension environment for opensocial-portlet will notbe undeployed
16:31:46,945 INFO [PortletHotDeployListener:406] Unregistering portlets for opensocial-portlet
16:31:46,976 INFO [PortletHotDeployListener:442] 2 portlets for opensocial-portlet was unregistered

16:31:48,211 INFO [PortletAutoDeployListener:81] Portlets for C:\liferay-portal-6.0.4\deploy\opensocial-portlet-6.0.2.1.war copied successfully. Deployment will start in a few seconds.
Oct 6, 2010 4:31:49 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [com.google.inject.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Oct 6, 2010 4:31:49 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type (value [org.apache.shindig.common.xml.XmlUtil$2@75f0a3]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.DocumentBuilderImpl@10962b2]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
Oct 6, 2010 4:31:49 PM org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
SEVERE: A web application created a ThreadLocal with key of type (value [com.google.inject.InjectorImpl$1@12eb786]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@12f563]) but failed to remove it when the web application was stopped. To prevent a memory leak, the ThreadLocal has been forcibly removed.
16:32:02,745 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
Loading file:/C:/liferay-portal-6.0.4/tomcat-6.0.26/webapps/opensocial-portlet/WEB-INF/c­lasses/service.properties
16:32:02,964 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:10,497 INFO [PortletHotDeployListener:222] Registering portlets for opensocial-portlet16:32:10,528 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:10,575 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:11,372 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:11,466 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
Loading file:/C:/liferay-portal-6.0.4/tomcat-6.0.26/webapps/opensocial-portlet/WEB-INF/c­lasses/portlet.properties
16:32:11,497 INFO [PortletHotDeployListener:376] 2 portlets for opensocial-portlet are available for use
Loading file:/C:/liferay-portal-6.0.4/tomcat-6.0.26/webapps/opensocial-portlet/WEB-INF/c­lasses/service.properties
16:32:12,044 INFO [DialectDetector:69] Determining dialect for HSQL Database Engine 1
16:32:12,044 WARN [DialectDetector:84] Liferay is configured to use Hypersonic as its database. DoNOT use Hypersonic in production. Hypersonic is an embedded database useful for development and demo'ing purposes. The database settings can be changed in portal.properties.
16:32:12,060 INFO [DialectDetector:49] Using dialect org.hibernate.dialect.HSQLDialect
Loading file:/C:/liferay-portal-6.0.4/tomcat-6.0.26/webapps/opensocial-portlet/WEB-INF/c­lasses/service.properties
Oct 6, 2010 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Oct 6, 2010 4:32:16 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/opensocial-portlet] startup failed due to previous errors
16:32:16,780 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:16,811 WARN [SAXReaderImpl:429] XSD validation is diasabled because org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
16:32:16,905 INFO [ExtHotDeployListener:205] Extension environment for opensocial-portlet will not be undeployed
16:32:16,905 INFO [PortletHotDeployListener:406] Unregistering portlets for opensocial-portlet
16:32:16,905 INFO [PortletHotDeployListener:442] 2 portlets for opensocial-portlet was unregistered

Oct 6, 2010 4:32:16 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: A web application appears to have started a thread named [com.google.inject.internal.Finalizer] but has failed to stop it. This is very likely to create a memory leak.
Gepostet am 06.10.10 09:59 als Antwort auf Julien Leray.
Possibly a dumb question but I have been googling for 30 min to find a directory of open social gadgets... anyone know where they are?
Gepostet am 14.06.11 15:33.
I created an OpenSocial gadget (6.0.6.1) with the URL that contains https and got an exception:

08:36:54,853 ERROR [PortletServlet:96] javax.portlet.PortletException: org.apache.shindig.gadgets.process.ProcessingException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
javax.portlet.PortletException: org.apache.shindig.gadgets.process.ProcessingException: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.liferay.opensocial.portlet.GadgetPortlet.render(GadgetPortlet.java:88)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:101)
.....
does anyone know what to be defined so that OpenSocial gadget can handle seccured URLs?

Thanks
Gepostet am 05.08.11 06:58 als Antwort auf Ryan Terwedo.
Has anyone integrated Jira and Liferay using OAuth?

I created public/private key using keytool and exported the certificate into rsaSigningKey.pem. Placed this file in liferaydatafolder/opensocial/.

Configured Incoming authentication in Application Links of Jira with

Consumer key - www.myliferay.com

Consumer Name - Liferay

Public key - public key text from rsaSigningKey.pem file.

Public key greyed out and saved the configuration.

Added the OpenSocial gadget onto the Liferay page. Gave the url of activityStream of Jira and in Manage OAuth section selected RSA_private and gave the consumer key as www.myliferay.com. Saved the configuration.

My activity stream in Liferay shows empty. When I checked the liferay console, it shows an error of jodd.bean.BeanException: Simple property not found: oAuthConsumerId Invalid property: 'OAuthConsumerImpl#oAuthconsumerId (actual: 'OAuthConsumerImpl#oAuthConsumerId', forced=false)

Where am I going wrong? should the consumer key be the CN of public/private key creation?

Regards,
Kicha
Gepostet am 28.02.12 03:44.
Only the todo list is still working do you have any other examples?
Gepostet am 27.03.14 21:32.