What is use of EXT Plugins?
change preferences (by setting preferences from portlet.xml)
-change init paramete in portlet-ext.xml (e.g changing default RSS)
-override value of portlet-custom.xml with portlet-ext.xml
- The only problem with EXT is that it is not hot deployable
Explain Liferay EXT Folder structure?
Answer: ext-impl Contains all your source and configuration files (except those related to the web application). When an Ext plugin is created, several important files are placed in its subdirectories. The most significant are as follows:
- /src/portal-ext.properties—Used to override the values of the properties in the portal.properties configuration file that ships with Liferay Portal.
- /src/system-ext.properties—Used to override the values of the properties in the system.properties configuration file that ships with Liferay Portal.
- /src/content/Language-ext.properties—Used to add your own internationalized text messages or to override the messages that ship with Liferay Portal, just as you’ve seen with plugins. You can add variations for other languages using the Java convention for message bundles. For example, the translation to Spanish should be named
To add entries to the web application configuration file, edit /docroot/WEB-INF/web.xml.
To add a portlet, edit /docroot/WEB-INF/portlet-ext.xml, /docroot/WEB-INF/liferay-portlet-ext.xml, and /docroot/WEB-INF/liferay-display.xml. You may also want to edit /ext-impl/src/content/Language-ext.properties.
These *-ext.xml files are read after their parent files are read and override their parent values. Note that I don’t recommend adding portlets in the Ext plugin; it’s far better to write a portlet plugin instead.
If you’re customizing some of Liferay’s internal StrutsPortlets, the following files will also be of interest to you: docroot/WEB-INF/struts-config.xml and docroot/WEB-INF/tiles-defs.xml.
How do you deploy Ext plugins ?
There are two ways to deploy an Ext plugin:
■ If you’re deploying to Liferay running on your developer machine, you can use Ant scripts in the Plugins SDK: specifically ant deploy and ant direct-deploy.
■ If you’re deploying to Liferay running on another machine, you can create a .war file via ant dist and deploy it manually to Liferay (by copying it into Liferay’s deploy folder or using the UI).
If you use ant deploy, your Ext plugin is packaged into a .war file and then copied into Liferay’s deploy folder. If you use ant direct-deploy, your Ext plugin is copied directly out to the running Liferay instance,
without going through the deployer.
What happens If two ext plugins created for same thing, and getting deployed?
None of them getting deploy as liferay keeps track of change Use of EXT (General Study)
Explain EXT Best practices?
- Extend class and modify and call super
- minimize multiple ext plugins
- Allow access to Portal Class loader
How do you change WIKI Portlet preferences?
Ans : EXT (AS we may need to override portlet-ext.xml file which)
Note:- Portlet preference can be defined in portlet.xml rather than liferay-portlet.xml file