Monday Dec 03, 2007

Netbeans 6.0 has been released. Download it now!

Today, it is a major milestone for Netbeans.  It announced the release of much anticipated 6.0 Version of the IDE and it is available for download now.

In this release several of  the addons  packs are consolidated in to a single IDE such as Visual Web Pack, Ruby and Rails, Enterprise Pack, C++ pack etc.


Easy-To-Use Java GUI Builder

Create professional-looking Java GUIs by placing and aligning components on a canvas.


Visual Web and Java EE Development

Build standards-based web applications visually using Ajax, CSS, and JSF. Full set of tools for EJB development.

Visual Mobile Development

Create, test and debug GUI applications that run on mobile phones, set-top boxes, and PDAs.

Visual UML Modeling

Separate software design from implementation with UML Modeling.

Ruby and Rails Support

Powerful Ruby editor (with code completion), debugger, and full support for Rails. Includes the JRuby runtime.

C and C++ Development

Full-featured C/C++ editor, debugger, project templates, and support for multiple project configurations

Wednesday Nov 21, 2007

Netbeans 6.0 Release Candidate 2 available now announces the availability of Netbeans 6.0 Release candidate 2. It can be downloaded from

Don't forget to read the Release Notes

Thursday Nov 08, 2007

How to Create a CSS based Page Layout - Part 1

Earlier, I posted a module that allows you create a Page Layout for your Visual Web pages from few pre-defined Page Layouts. However, you may be interested in developing your own Page Layouts.

There are two ways to create Page Layouts

  • Using nested tables to arrange children.
  • CSS based positioning.

I have put together an article that explains how to create a CSS based fixed width page layout.

Creating a CSS based Fixed Page Layout - Part1

Related articles

How to create Netbeans Visual Web Page Layout Plugin

NB 6.0 plugin for Predefined Visual Web Page Layouts

Sunday Nov 04, 2007

NB 6.0 Tip: Finding the examples for Visual Web Woodstock AJAX Components

Do you know each and every Woodstock AJAX Component bundled with Netbeans 6.0 Visual Web has plenty of examples explaining every details of the component. My recommendation is to go through these examples to learn about the powerful features of these components.

Getting these examples is very easy. They are available in the TLD documents which are bundled in the IDE. To bring up the TLD documentation invoke the action Help -> Javadoc Reference -> Project Woodstock 4.1 Tag Library.

TLD Doc Menu

This brings up the browser with component TLD doc. The examples are embedded in the TLD description

Component Example

Here is an example in the Button TLD doc for Asynchronous Update

Wednesday Oct 31, 2007

NB 6.0 plugin for Predefined Visual Web Page Layouts

One of the glaring gap in the Netbeans Visual Web Application development is lack of ability to create Pages using predefined Page Layouts. Currently Visual Web users create a Visual Web JSF page using New -> Visual JSF page. This creates the "boring" empty page with no page layouts. It is up to the users to create their page layouts. Users tend to create Page Layout using external tools like Dream Weaver and import them in to VW pages. Unfortunately, page layouts created using these external tools require lots of hand crafting to fit in the VW design paradigm. I was thinking, how nice it would be if Visual Web provides some predefined Page Layouts for the users to select when they create their pages. So I wrote this experimental module that allows you to select such predefined Page Layouts.

Disclaimer:This is not a Netbeans 6.0 release supported plugin. It did not go through any rigorous QA tests like other Netbeans 6.0 Visual Web plugins. So comes without out any warranty.

Download the plugin sources:

Steps to install the plugin and create page from Page Layout

  • Download and install Netbeans 6.0 Beta2 (Important: You need NB 6.0 Beta2 or later)

  • Download and install the plugin org-netbeans-modules-visualweb-woodstock-pagetemplates.nbm

  • Once you installed the plugin, it is easy to create a Visual Web Page with one of the predefined Page Layout. Install Page Layout Module

  • Next create a Visual Web Page using New -> Visual Web JSF Page as usual. You will notice that New wizard has one more panel. Page Layout creation wizard

  • Select a Page Layout and click finish. This creates the page with desired layout which can be edited in the designer later.
    Page with Page Layout in the designer

Note: As I mentioned earlier, this is an experimental module and the Page Layouts I've added are experimental too. If you think this module should be converted to an officially supported module, leave a comment to this blog or vote for the feature request at the issue #120748. My idea is to pick some layouts from Open Source Web Design and convert them as Visual Web Page Layouts and present them via the New Page Wizard. Here is an example (andreas01)

OSWD Page Layout

See also

How to Create a CSS based Page Layout
How to create your own Visual Web Page Layout Plugin


Saturday Oct 20, 2007

Expected NB 6.0 Beta2 Visual Web Application runtime performance boost

As you know Netbeans 6.0 Visual Web application uses Project Woodstock JSF components. There were complains that the pages generated with these components were slow while loading. Woodstock team took a harder look at the possibilities of such poor performance. They identified some of the areas where performance could be improved. After fixing those areas, Woodstock team recently announced up to 20-30% boost in page loading. Here are some announced results.

With the help of Dojo .9 and after merging all JavaScript and CSS files, the load time dropped by 50%. The max number of requests also dropped from 82 to just 17.

Example App Page Dojo .4 Dojo .9 Merged JS and CSS files

Requests Seconds to Load Requests Seconds to Load Requests Seconds to Load
index.jsp 54 8.819 38 5.857 14 4.615
button/Button.jsp 59 4.284 46 3.338 12 2.431
propertysheet/PropertySheet.jsp 79 8.730 67 6.347 17 4.717
table/table.jsp 82 7.400 68 5.477 17 4.109
accordion/example1.jsp 76 5.355 60 4.055 11 2.351
field/TextInput.jsp 54 4.053 45 3.436 12 2.100
calendar/calendar.jsp 69 4.797 54 3.920 12 2.414

You can read more about the announcement at the Woodstock Forum at this message. Since Netbeans 6.0 Beta2 Visual Web would bundle these performance boosted components, you could expect similar performance boost in the Visual Web Application at runtime.

Sunday Oct 14, 2007

NB 6.0 Visual Web Table Component Binding Enhancements To Use POJOs

Netbeans 5.5.1 Visual Web Table Component allows binding only via Data Providers such as CahcedRowsetDataProvider. While working with Hibernate or JPA or Spring framework, you must be dealing with Plain Old Java Objects (POJOs). If you have List or Array of  POJOs, then only way to bind them to the Table Component is by creating ObjectListDataProvider or ObjectArrayDataProvider. Also, due to a bug in Netbeans 5.5.1 Visual Web designtime, you may have to use the work around I explained in one of my earlier blogs - Work around for Object List Data Provider design time problem.

We have changed couple of things in Netbeans 6.0 related to Table Component binding.

  • Creation of an Object Array or a List Data Provider is not necessary to bind a Table Component to POJOs
  • We have eliminated the need for compile, close and  open the project ceremony after creating the POJOs in the project. It is enough to compile the project and may be refresh the designer if the page is already opened. (My wish is to eliminate even the need for compiling the project, by source modeling all the Java sources in the project. The main obstacle is performance. So, currently we handle only compiled objects.)

Binding Array of POJOs

In order to bind Array of POJOs, first you need to create a property in the backing Page Bean or some other Managed Beans (Ex. SessionBean1), that returns Array (say myArray) of the Specified Object (say MyObject). To create the property

  • Type the line private MyObject[] myArray;
    • Right click on this line and select the action "Generate Code"
    • In the resulting popup menu select "Getter and Setter"

The above would add the code to the Java source as

private MyObject[] myArray;
public MyObject[] getMyArray(){
     return  myArray;

public void setMyArray(MyObject[] myArray){
     this.myArray = myArray;

Now to bind myArray, compile the project, refresh the designer and bring up the Table Layout. You will find myArray listed in the drop down list as show in the picture below.

Array of POJOs binding

Binding List of POJOs

Binding List of POJOs is more or less same as binding arrays with one important difference.  In case of Array of POJOs, the Array itself has information about the type of the POJO. However, in case of List of POJOs, the Table Component can not determine the type of the POJO, since List is one of the generic interface in the Collections Framework. In order to solve this problem, Java Generics comes handy. You can specify the type of the POJO, that will be added to the list, to the design system using a parameterized List as shown below. This is really useful if the List will be populated lazily during runtime. Add the myList property to the backing Page Bean

  • Type the line private List<MyObject> myList;
    • Right click on this line and select the action "Generate Code"
    • In the resulting popup menu select "Getter and Setter"

This would add the code to the Java source as

private List<MyObject> myList;
public List<MyObject> getMyList(){
     return  myList;

public void setMyList(List<MyObject> myArray){
     this.myList = myList;

Similar to binding Array of POJOs, bring up the Table Layout and  myList will be listed in the drop down list as show in the picture below. Don't forget to compile the project and refresh the designer.

List of POJOs binding

Note: Even though explicit creation of Data Provider is not necessary, Table Component implicitly creates the Data Provider.  You might want to get information from the underlying Data Provider. For example if you have a column with Button or CheckBox or RadioButton, you might want to find the location of the selected row. Here is a code that would help you to do that.

    RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
MyObject[] myArray = getSessionBean1().getMyArray();
int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
MyObject myObject = myArray[rowId];

Wednesday Oct 10, 2007

Migrating Sun Java Studio Creator 2 Portlet Project to Netbeans 6.0 Web Project

One of the blocking issue for several Sun Java Studio Creator users to migrate to Netbeans 6.0 from Creator 2 is the inability to import their Creator 2 Portlet project. Don't despair, help is on the way.

Po-Ting Wu, one of the Visual Web Engineers, has written a nice article on how to achieve this.

Import Creator 2 JSR-168 Portlet Projects into NetBeans 6.0

If you are looking to create a Portlet project in Netbeans 6.0 with Visual Web project, then the following article may be helpful.

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

I found one more article that explains how to create a Portlet project using Woodstock Project Component and Netbeans Web Project.

Running Woodstock JSF Components in Portlet environment

Monday Sep 17, 2007

Netbeans 6.0 Beta1 has been released

Today announced that it has released Netbeans Beta1.

It can be downloaded from the page

The News and Note Worthy in this release can be found at the wiki page 

From this NB 6.0 release onwards, to create or work with a J2EE 1.4 Visual Web project which will be deployed to a 1.4 J2EE application server, first you need to install the Visual Web JSF Backwards Compatibility Kit plugin. You can find the details at News and Note Worthy mentioned above.

Tuesday Sep 11, 2007

NB 6.0 plugin to convert old Creator J2EE 1.4 project to VWP Java EE 5 (JSF 1.2) project

Using Netbeans 6.0 you can create and edit Visual  Web Applications with JSF 1.2 and Java EE 5 support. These Java EE 5 projects use Project Woodstock Components with advanced AJAX capabilities. Netbeans 6.0 also provides a neat migration path to open and edit old J2EE 1.4 projects created using Sun Java Studio Creator. However, the components used in these J2EE 1.4 projects are still the old Sun Web UI Components with no AJAX capabilities. NB 6.0 Visual Web does not provide upgrade path for these projects, so that they can be converted to Java EE 5 project with JSF 1.2 support and AJAX capable components.

I've written a small helper plugin to "plugin" this hole. This tool takes the old  JSF 1.1 (J2EE 1.4) project and converts it to JSF 1.2 (Java EE 5) Project. The converted project can be opened in Netbeans 6.0 and edited like any other Java EE 5 Web project created using Netbeans 6.0. The components are also upgraded from JSF 1.1 Sun Web UI Components to JSF 1.2 Project Woodstock Components. This could be accomplished easily because Project Woodstock components still use the same tag name and most of the old tag attributes.

Disclaimer: This is not a Netbeans 6.0 release supported plugin. It did not go through any rigorous QA tests like other Netbeans 6.0 VWP plugins. So comes without out any warranty.

Steps to install the plugin and convert a project

Important Note:
Before using this tool, first migrate the project using Netbeans 6.0, especially resolve the datasources. For details on datasource migration read John Baker's blog on Visual Web: Recovering database connections . For overall migration details read Tips for Migrating Java Studio Creator 2 Update 1 Projects to NetBeans IDE 6.0

  • This plugin adds a menu item called Visual Web Project Converter to the Tools Menu.

    Visual Web Project Converter Menu Item
  • Clicking on this menu items pops up a dialog where you can browse and provide the directory of the old project and a new directory where the converted project will be placed.

  • Clicking on the convert button, converts the old Java EE 1.4 project and places the converted Java EE 5 project in the provided new directory. Once the project is converted a Diff Viewer dialog pops up and gives an opportunity to browse the diff of converted files in the old and newly converted project.

    Project Converter Diff Viewer

  • Click on the convert button in the Diff Viewer to complete the conversion and open the converted project in the IDE.

    Project Converter - Open Project

PS: Leave a comment if you are able to convert your project or having trouble using this tool.


  • The layout switched to org.desktop.layout so that the NBM can be installed in Netbeans 6.0 IDE that  runs on JDK 1.5.
  • JSPF convesrion included.

Sunday Aug 19, 2007

Creating Netbeans 6.0 Visual Web Components Custom Theme Using Theme Builder

One of the difficult tasks of Netbeans 6.0 Visual Web Pack (VWP) application development is to create a custom theme for the bundled Java Server Faces Components (Woodstock Components). Nobody wants to see their web application visually appear similar to hundred of Web Applications developed using Netbeans 6.0 VWP. But VWP theme structure is complex and no tools are available to support creation of a new custom theme which would help to make the pages look different.

This is my modest attempt to create such tool that helps the users to create a custom theme. Once installed, the tool adds a project type called Woodstcok Components Theme Builder under the category web. A new project can be created using that project type. The created project displays lists of theme resources in the project explorer that can edited. Finally to create the edited custom jar, just build the project.

Woodstock Components Theme Builder for Netbeans 6.0 M10 can be downloaded from here.

Updates available for later releases of Netbeans

Note: I developed this tool during my spare time, so it did not go through any rigorous QA tests like other Netbeans 6.0 VWP modules.

Steps to create a custom theme using Theme Builder

  • Download and install themebuilder.nbm
    Theme Builder Autoupdate
  • Create a new project using File -> New Project -> Web -> Woodstock Components Theme Builder
    Woodstock Components Theme Builder
  • The wizard lets you specify the theme name and theme package. The created project has logical view of the theme resources such as CSS, images, JavaScript and messages. The project is filled with resources from the default theme bundled with Netbeans 6.0 VWP.
  • Modify the resources using available editors such as CSS Editor. JavaScript Editor and Message Editor.
  • Once the resources are edited using available editor, build the theme jar using the build command via the project context menu or the build icon in the toolbar. The build creates the theme jar in the distribution (dist) directory of the project.

Step to use the custom theme created using Theme Builder

  • Create a new Library under the category Theme Libraries. Browse and add the theme jar created using Theme Builder project.
  • The added theme library automatically appears in the project explorer under the Themes node in a web project. Right click the node and select menu item "Set as Current Theme". This sets the custom theme as default theme for your project.

Monday Jul 02, 2007

Netbeans 6.0 Milestone 10 (M10) has been released

Today announced that it has released Netbeans 6.0 Milestone 10 (a.k.a M10 release).

It can be downloaded from the page

The News and Note Worthy in  this release can be found at the wiki page 

Some of the Note Worthy in Visual Web Pack for this release are

  • Migratio of Visual Web Java Refactoring to Retouche 90533
  • Implementation of package and folder level Rename and Move refactoring. 104532
  • Visual Query Editor is now accessible from DB Explorer. 90447
  • Visual Consumption of EJB 2.1 in Visual web apps 90455 (With some minor limitations)
  • Completion of Web Services consumption - test node action, make it confirm to the web service functionality in NetBeans
  • User directory migration from Creator 2, 2u1, NB 5.5 or 5.5.1 to NB 6.0 99740
  • Resolving data source references 94804
  • Data Source Naming 88871
  • Completion of Page flow editor functionalities - dealing with mutiple faces-config files. 97896
  • Performance improvements
  • Open sourcing of rowset implementation used by Visual Web
  • More Ajax enabled components from Project Woodstock - RadioButton Group, Checkbox Group, Listbox, TextArea, Anchor, Hyperlink, ImageHyperlink, Calendar. (Project woodstock Road map)

Even though this is just a milestone release (not even a beta release, and occasionally throws exception), I'm using it for my day to day development work (brave huh!).

Friday Jun 29, 2007

Netbeans 6.0 Visual Web Pack Performance Improvements

One of the main concerns of Netbeans VWP 5.5.1 is its performance. The performance degrades when the project size grows. A dedicated tiger team has been formed to look in to the performance of VWP. We did several performance studies and much of our findings are reported at Some of the problems have been fixed and some more will be fixed soon. I did a bench mark with a real world project of about 50 pages. Here are the results.

Netbeans 5.5.1 Netbeans 6.0
Mac Windows Mac Windows
Opening the project (No pages Opened) 8 secs 15 secs 5 secs 12 secs
Opening first Page 1:05 min 1:40 min 9 secs 15 secs
Dropping a Table Component 12 secs 20 secs 5 secs 8 secs

Tuesday May 29, 2007

Josh and Friends - A Real World Web Application Developed Using Netbeans Visual Web Pack

There are questions from several VWP users - Is it possible to write a sophisticated web site using Netbeans Visual Web Pack (VWP). My answer is - yes, it is possible. I happened to work with several users of VWP who have written full blown websites using VWP. One of them is Josh and Friends - The #1 Dance Music Community, developed and maintained by Joshua van Aalst.

When Josh sent the URL of his site to me, I looked at the site and thought; was it really developed using VWP?. Poking around the web site did not give me a clue. So I decided to clarify it with Josh. He assured me that indeed it was developed using VWP with right combination of technologies. Thought it is a good idea to let him explain how he did it in this blog, so that other users can benefit from it.

A good looking data driven website consists of two parts

  • Feature rich Layouts, so called "website pages"
  • Rich data bound pages with proper data flow (a real web application)

VWP is a wonderful tool for the latter. But it is still in its infancy to design sophisticated page layouts.

In his own words, Josh explains how he achieved the task of combining the two.

The layouts can be created by:

  • Downloading a pre-created layout template
  • A web designer using dream weaver <-- This is how our layouts were created

The entire site other than the forums and gallery is VWP developed. For the moment you can tell whichever URL has /dancemusic/ in it. That is the context root.

There are couple of major tricks.

  • The main one is that the site is highly SEO ( Search Engine Optimization) optimized.
  • Extensive use of converters.
    • The way I do that is by using JSF converters <-- this is probably why it doesn't look like a VWP pack project.
    • Basically I use standard <h:outputText> with a converter for most display pages. For edit pages such as:
    • I use basic webuijsf components for editing (e.g. addremovelist, listbox, fileupload components) and standard <h:outputText> to display any info <-- Result tables display info uses converters.
    • The converters allow me to put href links with title attributes and alt attributes around images.

URL re-writing

  • I have a ServletFilter that intercepts all URLs and allows SEO URL rewriting to the VWP pages

The site is built on:

  • VWP/JSF <-- Web front end
  • Spring 2 <-- Service layer
  • Hibernate 3 <-- Backend

From VWP the site uses:

  • A variety of components including add remove list, tables with paging, file uploads, radio groups, check box groups and more.
  • JSF Converters.
  • JSF Page Navigation.
  • Session and Request beans
  • Plenty of Auto-submit on change actionExpressions have a play around with:

The result

Wednesday May 09, 2007

JavaOne 2007 Hands on labs (AJAX related) are available online

JavaOne 2007 hands on labs are available for download at

The available labs are

  • LAB-4410 Benchmarking and Profiling Web 2.0 Applications For Performance
  • LAB-4420 Building Ajax-Enabled JavaServer Faces Web Applications With jMaki, Dynamic Faces, and the NetBeans Visual Web Pack
  • LAB-4430 Developing Custom JSF Components For NetBeans Visual Web Pack
  • LAB-4440 Building Web2.0 application using Sun Web Developer Pack( SWDP), GlassFish and Netbean LAB-4450 Rapidly Building a Real Life Application With Ajax and JavaServer Faces Components using the NetBeans Visual Web Pack
  • LAB-4460 Building Ajax-Enabled JavaServer Faces Web Applications With jMaki, Dynamic Faces, and the NetBeans IDE
  • LAB-5410 Securing Identity Web Services

I'm one of the authors of the lab LAB-4460


« August 2016