Skip to main content

Digital Transformation

Now you can generate portlets using XMLPF

XMLPF stands for XML Portlet Factory and is an open source tool that can build Liferay portlets from XML definition files.  The software creates database CRUD portlets based on the definitions contained in an XML file.  Here is a link to the project website: http://www.xmlportletfactory.org/

 

An example portlet is shown to the right.  XML Portlet Factory generated the entire user interface, made connections to the database and created the table of results.    While the user interface is not bad, you can go into the generated portlet code and make changes to the files directly.  However, once you make changes to the generated portlet, your changes are not reflected back into XML Portlet Factory.

Documentation on the project site is pretty good and installation is a breeze.  Here is a link to the documentation wiki: http://www.xmlportletfactory.org/web/guest/wiki  The system comes with ANT scripts to build the portlet and automatically deploy it to Liferay.

Below is a snippet of the XML file used to generate the portlet:

<classDef>

	<name>Users</name>
	<title>Users Maintenance</title>
	<mode>
        	<add>true</add>
		<delete>true</delete>
		<modify>true</modify>
		<browse>true</browse>
	</mode>
</classDef>
<fileDef>
	<name>users</name>
	<fields>
		<field>
		<name>usersId</name>
		<title>Id</title>
		<type>
			<long>
			<length>5</length>
			<signed>false</signed>
			<nullable>false</nullable>
			<order>true</order>
			</long>
			</type>
		<showFieldInView>true</showFieldInView>
		<required>true</required>
	</field>
...

Note:You may have heard of Portlet Factory in conjunction with IBM WebSphere Portal.  XML Portlet Factory is not that product.  IBM’s product has been renamed to Web Experience Factory.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Mark Polly

Mark Polly is Perficient's Chief Strategist for Customer Experience Platforms. He works to create great customer, partner, and employee experiences. Mark specializes in web content management, portal, search, CRM, marketing automation, customer service, collaboration, social networks, and more.

More from this Author

Follow Us