portlet rendering in liferay - plugins

I have two portlets and these two are two different web applications (war).
When the user selects a radio button from Portlet1 it has to switch to Portlet2.
I am able to publish the event from Portlet1 and able to process from Portlet2 and both are getting rendered in separate divisions of the page template created from liferay portal.
But my problem is Portlet2 has to overlay portlet1 division (while displaying the content) and has to display the Portlet2 content in Portlet1 content division.
I am using liferay 6.0.5 and using struts portlet plugin to migrate existing application to liferay portal.

My suggestion would be to package both Portlet1 and Portlet2 into the same WAR file. Both portlets will use the same JSPs in that case and you will just configure the portlet XML files (portlet.xml and liferay-portlet.xml) with 2 portlets instead of one. You can configure both portlets to use a different start view.
With this setup it is easy to move from one view to another, as you're just switching between JSPs inside one WAR file and you don't really need inter-portlet communication.

Related

Liferay 7.2 Customize Documents And Media Porlet

I have Liferay 7.2
I want to customize the html of the layout of the widget Documents AND Media
I tried to create a hook to document and media but it seems that is not the right way.
How can i do that?
First, the fact that you're talking about a hook tells me that you're coming from Liferay 6 or earlier. Forget the old module types ("war-style modules"), embrace the new "jar-style modules" or "OSGi modules", which leverage the OSGi methods and mechanisms in the foundation. The new module type that comes closest to the functionality of hooks would be a "module fragment".
Alternatively, if you want to create one module that overrides the JSPs of more than one other module (or overrides JSPs as a side effect to its main purpose), you may want to look into "JSP Bags".
Still, both methods are discouraged and should be taken as a last resort, according to Liferay's "Introduction to Customizing JSPs".
The preferred method would be to use Dynamic Includes (albeit they only work if the target portlet has been written to include inclusion points) or Portlet Filters (which basically allow you to programmatically edit the request to and response from the standard Portlet classes and JSPs).
Still, if you're aiming to replace most of the JSPs of the standard document and media widget (keep in mind: Widgets are still Portlets, they just have been renamed in the frontend), a module fragment still seems to the best way forward.
To identify the correct module, here are the necessary steps. I'll show it using the DLAdmin portlet from the control panel as an example:
Identify the portlet you want to edit: Look into the HTML using the DOM inspector of your browser. Look for section tags with IDs like <section class="portlet" id="portlet_com_liferay_document_library_web_portlet_DLAdminPortlet"> around the area of interest.
Now translate that ID into a package path with portlet class: com.liferay.document.library.web.portlet.DLAdminPortlet. Search for that class in the Liferay github repository. (Go there, press T, enter the class name, find its Java class source file. In case of multiple hits, you need to check the package path, too.)
Once you opened the source file, go back up in the file tree to the parent folder of the src folder. There's a bnd.bnd file. Take a look into it, it will tell you the Bundle-SymbolicName.
Use the Liferay IDE or Blade CLI (depending on your development environment) to create a module fragment for the module identified by the Bundle-SymbolicName.

Deploying SAP standard fiori application as a custom fiori application

I had a requirement to add custom logic in SAP standard fiori application and deploy it as a custom application. it's Application Type is Transactional (SAP Fiori elements). i couldn't use extension project or Adaptation project to make my changes. it is showing an error (Extending smart application is currently not supported). So i have made changes in application as it was already extended by SAP (it have "ext" folder in it also have reference in manifest.json) and working fine in Webide.
So i deployed that application as a New application and gave different application ID. In SE80 BSP application it is displaying my changes. But very same application changes are not being reflected on Fiori launchpad.
please let me know if more information is required.
i have used following blogs for my reference.
Standard Application Link in Fiori Application Library
https://blogs.sap.com/2019/01/14/adaptation-projects-a-tutorial/comment-page-1/#comment-464401
https://ga.support.sap.com/dtp/viewer/index.html#/tree/1910/actions/24709:24711 (Extending CDS wont fulfill requirement)
https://www.slideshare.net/MayankGupta290/extending-adaptation-project-from-sap-webide
https://help.sap.com/fiori_bs2013/helpdata/en/c1/804352b4e61b13e10000000a44176d/frameset.htm
It got resolved by just deleting component preload files from webIde.
and deploying it again.
Thanks all :)

Is it possible to load a GWT project in a Frame?

I have developed some kind of "mainframe" for my GWT app. This mainframe holds a GWT Frame object in which I want to load another GWT project, just like you can easily load HTML pages in iframes. The two projects are in the same workspace and I'm using the Eclipse Plugin. Is there any way to do this?
Add an id to your frame and use this:
RootPanel.get("yourFrameId").add(YourWidget);
This should work.

Use of Orbeon Forms into Liferay

I wanted to know how Orbeon Forms work in Liferay because the Web Forms portlet is very limited, so I visited Orbeon's website and read its documentation. Then I downloaded it and ran in a Tomcat server, I built a form with the Form Builder and then tried it with the Form Runner.
My question is, how can I export one of the forms I created with the Form Builder to include it in Liferay as a portlet for example? Is that possible? Can I export a form into a WAR for example and then deploy it into Liferay?
I know you can deploy Orbeon Forms into liferay but I only want to include a specific form, not all the application with the Form Builder, the examples etc.
Could anyone help me?
First, a clarification: if what you mean is that you just want "the form", in the sense of just the XHTML, that can't work because any form built with Orbeon Forms needs a runtime to function. If the form is created with Form Builder, that means the Form Runner runtime. Either way you will need an Orbeon Forms portlet or servlet.
The forms you create, when published, are stored into a database. By default this is the built-in eXist XML database, but you can use Oracle, MySQL, or your custom persistence layer.
In order to see forms in Liferay, you have two possibilities:
The Form Runner Liferay proxy portlet
The full Orbeon Forms portlet
I recommend you peruse these two pages for details.
How it works depends on which type of portlet you use.
If using the proxy portlet, then the portlet is very lightweight and just forwards requests to a separate webapp running the Form Runner runtime. You configure the portlet to point to a specific form.
If using the full portlet, then Form Runner runs directly as a portlet. Here the portlet will load a landing page, and you probably will want to modify that landing page to point to the forms you want your users to see.
In both cases, your published form will be found as long as Form Runner points to the right database.
In your case it seems like the proxy portlet might be your best option. Note that lots of bug fixes have taken place with the proxy portlet since 3.9, so I would recommend a nightly build. For reference here is the source of the proxy portlet.

Assign Portlet Macro Path in eea.facetednavigation

I want to add a 'Plone portlet' widget in Faceted criteria config screen. In particular, here I need a static portlet to add URL links. How do I fill the 'Portlet macro' field for a static portlet? Helper message is 'Path to portlet macro', and I already try values like 'here/portlet_static/macros/portlet' and 'here/portlet_recent/macros/portlet', all failed.
Plone 4.0.2 + eea.facetednavigation 4.0rc1
I don't know anything about eea.facetednavigation but it sounds to me like you have a bad mix of portlet technologies.
The /macros/portlet slot was only available in classic portlets based on simple templates as used in Plone 2.5. Since Plone 3 we have a completely different portlet machinery which no longer has any TAL macros in them.
As far as I know the EEA site is still using Plone 2.5 - so I wouldn't be surprised if many of their add-ons aren't compatible with later versions of Plone.