How to Integrate Portlet as Widget in Liferay to any Website/Application? - PowerPoint PPT Presentation

About This Presentation
Title:

How to Integrate Portlet as Widget in Liferay to any Website/Application?

Description:

In this Blog, we are going to explore Liferay’s out of the box (OOTB) feature Portlet Sharing which proffers customized Widget publishing at third party websites or applications through very simple techniques. – PowerPoint PPT presentation

Number of Views:71
Slides: 17
Provided by: AzilenTech
Category: Other

less

Transcript and Presenter's Notes

Title: How to Integrate Portlet as Widget in Liferay to any Website/Application?


1
How to Integrate Portlet as Widget in Liferay to
any Website/Application?
2
Intro
  • Flexibility of allowing the integration of
    widgets to any third party website/application
    increases the reach of application as well as
    provides the insights about working strategies.
  • Many social applications such as Facebook,
    Google and LinkedIn provide the code snippet and
    it is the common practice for developers to embed
    a widget plug into any third party website using
    that code snippet.

3
(No Transcript)
4
  • Applications developed using Liferay, can also
    handle Widget Sharing along with customized view,
    very easily.

5
Publishing Liferay Application widgets to third
party applications
  • The portlet applications developed for Liferay
    can be considered as widgets. Liferay provides an
    out of the box (OOTB) feature for publishing its
    portlets to other websites or applications.
    Simply by using this portlet sharing feature, we
    can plug our portlets to other websites virtually
    without any efforts.
  • In portlet configuration screen, Liferay provides
    Sharing tab.

6
(No Transcript)
7
  • You need to just copy-paste the code from Any
    Website section to your websites page. This
    code will create an embedded iFrame in your
    webpage and import the portlet from Liferay
    portal.

8
(No Transcript)
9
  • In above example, we embedded liferays
    hello-soy-portet into other website. The steps
    are very simple as shown above.
  • To enable the custom views of the portlet for
    different users, we must allow the user to
    generate the embeddable code snippet after the
    configuration parameters are set.

10
Lets understand with an example of weather
portlet
  • Suppose we have created a weather portlet in our
    Liferay portal and we want our users to be able
    to embed this weather portlet on their own
    website or portal.
  • Additionally, the user should be able to set
  • The unit of the temperature (Fahrenheit or
    Celsius)
  • A boolean value to indicate if humidity measure
    should be included or not
  • Language id

11
Following are the steps to achieve this
functionality
  • In our weather portlet, we can provide a plugin
    code generation screen, where the user can set
    the parameters and based on that, the portlet
    will generate code snippet.
  • Once the user submits the configuration form, we
    store the configuration values in database and
    generate unique id (UUID) of this record.
  • We can add the unique id in Liferays code
    snippet as a request parameter of URL. The code
    snippet would look something like this

12
(No Transcript)
13
  • Users will grab this snippet and add to the
    desired webpage(s) of their websites.
  • In the portlets render phase, you can get the
    cfg parameter. Get the configuration record
    based on that UUID.
  • Render the portlet based on the configuration
    saved by user.
  • This way all users will be able to configure and
    include the weather portlet in their own
    websites.
  • If you still have any query regarding how to
    enable widget integration for Liferay
    Application, you can discuss with our Liferay
    consultant! or send your query to info_at_azilen.com

14
(No Transcript)
15
  • Original Source
  • http//www.azilen.com/blog/enterprise-mobility-nex
    t-generation-mobile-enterprise/

16
Thanks You www.azilen.com Let us know if you
have any Question! info_at_azilen.com
1-972-325-2243
Write a Comment
User Comments (0)
About PowerShow.com