Satya's Blog

Wednesday May 14, 2008

Tutorial: JSR 286 portlet Eventing using Eventing Story Board

The recently released Portal Pack 2.0 has a new feature called Eventing StoryBoard.The Eventing StoryBoard feature in Portal Pack 2.0 simplifies the task of creating portlet application that uses JSR-286 eventing. It provides a simple drag drop feature to link the portlets involved in eventing. Automatic code generation functionality in the storyboard adds the necessary interfaces, methods and xml elements needed during eventing.

Here's a tutorial  contributed by Sriram K,  which explains about JSR 286 eventing using Eventing StoryBoard

 http://portalpack.netbeans.org/tutorials/eventing/EventingStoryBoardTutorial.html

There is also a screencast available for the same. Thanks to Hemadri, Anjana, Sriram for their help for this screencast

http://portalpack.netbeans.org/demos/evtstoryboard/eventing-story-board.htm 


Thursday May 08, 2008

Portal Pack and WebSynergy

There is a preview version of the WebSynergy plug-in available at Portal Pack project site. This plug-in supports portlet development and deployment on the new WebSynergy and also works with Liferay.


Prerequisites:
You need to install other Portal Pack 2.0 plug-ins before installing this plug-in. 

 
Using this plug-in :

  • You can write portlets which can be deployed on the WebSynergy and Liferay.
  •  By selecting the target runtime server as "WebSynergy", it automatically creates all liferay specific xml/properties file to the project.
  • Liferay specific files get updated whenever a new portlet is added to the project
  • Single click portlet deployment on WebSynergy and Liferay.
  • You can see a list of the deployed portlets in the Services tab under WebSynergy node inside your NetBeans IDE
  • Undeploy a portlet directly from the NetBeans IDE
  • Create PHP/Ruby Portlet which can be deployed on the WebSynergy. Ruby portlet development support is not currently available for download. But it will be available soon. 
  • Develop cross-platform inter-widget communication code using Eventing StoryBoard with simple drag and drop. To use this feature you need to download the latest nightly build of Generic Portlet Builder which is linked from the WebSynergy plug-in download location. Check these blog and screencast for more details.

Portal Pack 2.0 is now available

The Portal Pack 2.0 final version for NetBeans 6.1 is now available for download. It supports the new JSR 286 portlet specification.There are many new features which will help developers to write portlets quickly using JSR 286(Portlet 2.0) features. These plug-ins are also available at NetBeans 6.1 Auto-Update Center and
with Java Tools Bundle Update 5 .

 

 
Some highlights of this release are :

To know how to develop portlet using Portal Pack 2.0 read this article.

In the next few days, I will be blogging about some specific features in Portal Pack 2.0 . So keep watching this space :)

Monday Mar 17, 2008

New Visual JSF Portlet Builder in Portal Pack Beta 3

http://blogs.sun.com/satya/resource/jsf-small.PNG         A new plug-in called "Visual Portlet Builder" has been added to the recently released Portal Pack Beta 3 plug-ins list. Sometime back I had written a blog entry on how to create a JSF based portlet using NetBeans 6 + Portal Pack through some manual steps. This new plug-in eliminates all those manual steps and provides JSF portlet building capability inside Netbeans. It uses the existing VisualWeb's WYSWYG editor and enables portlet developers to design their JSF portlet through drag & drop components. You can use OpenPortal Portlet Container 2.0 RC1 to test your jsf based portlets.

Steps to create a JSF Portlet :

  • Create a Web Application with "Portlet Support" framework.
  • Right click on the project node, select New > Visual Web JSF Portlet Page
  • Enter page detail and press Finish.
  • Now you can drag & drop jsf components and design your jsf portlet page.
  • You can create more than one jsf portlet pages in the project and set them as VIEW/EDIT/HELP mode page for the jsf portlet.

To select jsf portlet pages for different modes of the portlet

  • Right click on the visual web jsf portlet page.
  • Select "Set as Initial" and select VIEW/EDIT/HEP mode page

Now you can build and deploy your project on OpenPortal Portlet Container from your NetBeans IDE.

The Portal Pack Beta 3 plug-ins are now available on both Portal Pack project site and NetBeans Beta Auto Update Center.

Thursday Sep 27, 2007

Portal Pack 2.0 Beta is now available

Portal Pack 2.0 Beta  for NetBeans 6.0 Beta 1 is now available. This version of  the Portal Pack supports portlet application deployment on both OpenPortal Portlet Container 1.0 and OpenPortal Portlet Container 2.0 Beta bundled with Java Application Platform SDK Update 3 Beta.

 (Check out Deepak's blog for more on Portlet Container 2.0 Beta in Java Application Platform SDK U3 Beta)

 

Some of the New Features in this release are 

  • Support for both Portlet 1.0(JSR 168) and 2.0 (JSR 286 Public Draft 1)
  • A new wizard to create portlet filters
  • Option for adding a new Public Render Parameter through UI
  • Drag and drop support to map Public Render Parameters/Filters to portlets

Useful resources :

Portal Pack 2.0 Beta Plug-ins can be downloaded as a zip archive from here.

These plugins are also available on NetBeans 6.0 Beta 1 auto update center.

Friday Sep 07, 2007

Migrate to Freemarker from Velocity template engine in your NetBeans Module


In Portal Pack Plug-ins, earlier Velocity template engine was used for all type of code generations and templating. But after going through some NetBeans doc I found that NetBeans 6 (Currently under development) bundles FreeMarker template engine with it. But FreeMarker apis are not exposed directly rather those can be used through JSR 223 Library Integration (JSR223: Scripting for Java Platform) in NetBeans Module.

You can follow the below steps for a easy migration from Velocity to Freemarker template engine in your module

[Read More]

Thursday Jul 26, 2007

Build JSF Portlet with NetBeans Visual Web Pack and NetBeans Portal Pack


In this blog I will explain how  NetBeans 6.0 M10 with Visual Web Pack and Portal Pack 2.0 preview plug-in can be used to develop & deploy JSF Portlet application.

[Read More]

Tuesday Jun 19, 2007

Portal Pack IPC Story Board - Tutorial

The Sun Java System Portal Server 7.x (Now Open Portal) /Open Portal Portlet Container enables JSR 168 portlets to communicate with each other through custom portlet eventing. The new Portal Pack 1.3 Beta for NetBeans 5.5/5.5.1 has a new feature IPC Story Board. Interportlet Communication Story Board(aka "IPC Story Board") provides a visual way of wiring(linking) portlets to listen each other's events. Then these portlet applications can be deployed and tested on Open Portal Portlet Container/Sun Java System Portal Server 7.x which are supported by the Portal Pack.


This blog is intended to help portlet developers to get acquainted with the new IPC Story Board feature in the Portal Pack.

[Read More]

Saturday Mar 31, 2007

Easy Steps to Set up Portlet Development Environment

This blog will help

  • All new portlet developers who don't know how to start writing portlets and test them
  • Developers looking for open source softwares to develop and test their portlets
  • Developers looking for an integrated portlet development environment

You can use the Java EE Tools Bundle U3 Preview which comes with pre-configured GlassFish appserver, Open Source Portlet Container and NetBeans IDE with Portal Pack Plug-ins to start portlet development.

But Alternatively if you want to use latest versions of mentioned components to set up your portlet development environment then go through this blog. 

The following open source components are required to set up your portlet development environment

  1. Glassfish Application Server
  2. Open Source Portlet Container
  3. NetBeans 5.5/5.5.1 Beta IDE
  4. Portal Pack Plug-ins

1. GlassFish Application Server

GlassFish is an open source application server. Download the latest version of GlassFish Application server from here.  GlassFish installation is very easy. Just follow the steps mentioned here

2. Open Source Portlet Container

The Open Source Portlet Container  is an Enterprise Class Open Source Portlet Container which is free and available for download here. This can be used to deploy/test your JSR 168 portlets. To install Open Source Portlet Container on the GlassFish AppServer run the following command which opens an GUI installer. The whole installation process completes within a few seconds

java -jar portlet-container-configurator.jar

Alternatively you can check installation instructions here 

3. NetBeans IDE 5.5 and above

Download and Install NetBeans IDE from https://www.netbeans.org 

4. Portal Pack Plug-ins

The Portal Pack NetBeans Plug-ins for Portlet development is  available in NetBeans 5.5 Beta Auto Update Center.

But if you want to try latest version of Portal Pack Plug-ins then download them from here . You can find the installation instructions for the plug-ins in download page.

As all of the above components are installed and configured properly, you can now start your portlet development. You can check user guides and documents available in portal pack doc page. If you want a short/quick tutorial on Portlet development using Portal Pack check this.





Wednesday Feb 07, 2007

Debug Portlet Application while using NetBeans 5.5 IDE and Portal Pack Portlet Plugin

This blog describes how you can debug a portlet application while you are using NetBeans 5.5 IDE + Portal Pack plug-in for portlet development.

This blog assumes that you are using 

Though Portal Pack plugin starts the Glassfish server automatically from NetBeans IDE, but currently it doesn't starts the server in debug mode. Using the following approach you can quickly debug your portlet application.

Set Debug mode for GlassFish Application Server

  1. Open NetBeans IDE
  2.  I am assuming that you have already added a Portlet Container instance in your NetBeans IDE
  3. Go to Runtime window . Right click on Servers > Open Source Portlet Container instance.
  4. Click "Start" to start the server.
  5. When the server is started properly. Open http://localhost:4848 in your browser.
  6. Login to GlassFish Admin Console as "admin" (default password is "adminadmin")
  7. Go to the "Application Server" page .
  8. Select the JVM Settings tab and the General option.
  9. Check the Debug Enabled box.
  10. Check debug port (default value is 9010)
  11. Select the Save button.
  12. Now  restart  the  server through  the NetBeans IDE  by the same way  you had started the server.

Configure debugger in NetBeans IDE

  1. Go to Run > Attach Debugger menu in title menu bar of NetBeans IDE.
  2.  It will pop-up a dialog box.
  3. Select Debugger as "JPDA Debugger"
  4. Select Connector as "SocketAttach"
  5. Give your machine host. (example, localhost)
  6. Give debug port no. (Default, 9010).
  7. Click Ok
  8. Now the debugger will be attached to the application server's debug port
You are now ready to debug your portlet application. Add break point in your portlet java file and start debugging. All of the above configuration steps are required once.