Dec 09
17

I’ve just added the portlet generator utility to this site. This utility replaces the “create.bat” and “create.sh” scripts that come with Liferay’s PluginSDK. It offers a GUI entry panel as well as the options to generate 4 different types of sample portlets: Struts, Spring, Struts2, and JSP. I plan to add more functionality to this later and expand its offering if the need arises.
The Swing interface is very simple: just fill in the portlet name (or portlet id), the display name (what will be shown in the title) and select the type of portlet. Then click the Generate button to make it all happen. A couple of things to note:
1) Follow the instructions on the download page.
2)Be aware that the Struts and Struts2 samples come pre-packaged with the Liferay tomcat loader already set in the META-INF folder. You’ll need to either change or delete according to your application server needs.
Many times I am asked why I’m such an advocate of portlet development over standard servlet development. “What are the advantages” the naysayers wonderk? Well, for those of you still considering portlet development, let me give you ten reasons why you should make the switch.
Well, I hope these 10 reasons help in convincing any skeptics that portlet development really is the only direction that future web application development can trend. Please feel free to add any other reasons you can think of in the comments section.
Aug 09
12
Four more core effects are Show, Toggle, Fade In, and Animate. This week’s portlet and the screencast below gives a demonstration of these four effects in a Liferay Portlet. As I should have mentioned last time, the code within the portlet to do one of these effects is very small. Here’s the code for the toggle:
jQuery('#link2').click(function() { jQuery('# block2').toggle();});
Of course, you have to setup a “div” with a unique “id=”. For portlets, we simply prepend the tag which makes the id unique across the portal. Take a look at the source code in the portlet’s view.jsp file for more information. I tried to keep the jQuery code clean and simple so beginners shouldn’t have to cringe too much
.