Final release of Visual Web Pack for Netbeans 5.5 is available now
Visual web pack for Netbeans 5.5 (VWP) has been released today. Thanks to all those who downloaded the Technology Preview of VWP and send us your valuable feedback. Hundreds of bugs have been fixed and several enhancements incorporated for the final release.
You can download the final release at http://www.netbeans.org/products/visualweb/
Continue to provide us with your suggestions and enhancement request via Issuezilla for a better future release.
Posted at 11:55AM Dec 06, 2006 | Permanent link to this entry | Comments [19]
Sun Java Studio Creator or Visual Web Pack
We have Sun Java Studio Creator 2 and now Visual Web Pack for Netbeans 5.5 (Technology Preview) has been released. There are lots of questions.
I will try to answer 1 & 2 in this blog. But I don't have an answer for 3. If any one can answer it, that is you, the Creator users. Based on my answer to questions 1 & 2, Creator users can give answer to 3, if they would like to have separate IDE called Sun Java Studio Creator or better have an unified IDE that includes Creator as Visual Web pack.
Why in the first place there was a separate IDE called Sun Java Studio Creator?
It all started way back in late 2001, few of Sun Senior Engineers pondered, what if we create an IDE that would attract developers new to Java world, especially who would like to move from VB/ASP to Java. Sun already has an IDE called Netbeans. However, at that time Netbeans was meant for developers with advanced Java skills, which of course is no longer true. Netbeans has grown so much over years, it can now cater for wide range of developers, from novice to advanced.
Developing an IDE from scratch is next to impossible, so must start with an existing IDE and modify. The solution may be to completely overhaul Netbeans. However, being an established Open Source tool, making incompatible changes to Netbeans for the sake of another breed of developers with out the consent of the community sounded impractical. So the idea of a new IDE was born, that would fork Netbeans source base (in a closed repository), and make incompatible changes to it, to make its look and feel similar to that of an IDE familiar to VB/ASP Developers. The new IDE was later called Sun Java Studio Creator. Since VB/ASP developers were the main target audience, developing an IDE for Java Based JSF application was an ideal choice. You can see from the following pictures how Creator was looked different from Netbeans 3.5.1.
|
|
| Creator 1. | Netbeans 3.5.1 |
Some of the main functionalities that were introduced in Creator and were missing in Netbeans 3.5.1 are
For an VB/ASP developer these functionalities are very similar to the one available in their favorite IDE.
However, when Netbeans 3.6 and then later Netbeans 4.1 was released, it was a different story - it was a major overhaul over Netbeans 3.5.1. When Creator 2 was released, it reused several of the functionalities from NB 4.1. Even though it used a forked source base of NB 4.1, very few modifications (less than 5%) were made to the platform. Creator 2 is almost (but not 100%) Netbeans 4.1 IDE + Pack of modules. You can see the similarity between the two IDEs from the following pictures.
|
|
| Creator 2. | Netbeans 4.1 |
Some of the main differences are
Why it is released as Visual Web Pack for Netbeans now?
One of the greatest strength of Netbeans IDE was that it always kept in pace with the Java Standards and releases. When JDK 1.5 was released, it was supported in Netbeans 5.0. Similarly, when Java EE 5 was released it was supported in the Netbeans 5.5 release. Since Creator was developed over a forked source base of Netbeans, there was a disparity between the two IDEs. Java Studio Creator was built over Netbeans 4.1, which did not support JDK 1.5. However, when Creator 2 was released, during that same time frame Netbeans 5.0 was released, which supported JDK 1.5. Several Creator 2 users were frustrated, because it did not support JDK 1.5.
As I mentioned above, since Netbeans (3.6 and later) has grown as a versatile and ease of use IDE, Creator 2 was more or less a pack of modules over Netbeans 4.1 IDE, but re-branded to be looked as a different IDE. However, it lacks the some of the nice features of latest Netbeans IDE (5.0 and later), which also existed at that time. If Creator existed just as pack, then it would have been far easier to just install it over Netbeans 5.0 and get the nice features of Netbeans 5.0. There fore, rather than fork the Netbeans source base and lag behind another Netbeans IDE release cycle itself, it seemed practical to release Creator as a pack over Netbeans 5.5. Once you install Visual Web pack over Netbeans 5.5 what you get is an IDE similar to Creator, except for the lack of Creator branding. See the picture below.
Having said that, you might ask, is Netbeans 5.5 + visual web pack is exactly similar to Creator?. The answer is - it includes about 90% of Creator 2 functionality, but not 100%. The reason is, some of the features were independently developed at the two code bases. Ex
Because of these dissimilar development, to avoid the collision, they are currently not supported in the Visual Web Pack for Netbeans 5.5. However, our trip to Prague is to address these dissimilarities between Netbeans and Creator modules, so that Creator users can get a 100% migration path for next release of Visual Web Pack. The picture below shows Creator as a Visual Web Pack for Netbeans 5.5
|
| Netbeans 5.5 + Visual Web Pack |
Does that mean, there will not be any more release of Sun Java Studio Creator?
As I mentioned at the start of this blog, it is up to the Creator users to decide. If they request separate IDE called Creator 3, then our management and marketing team might consider the request. But I'm sure, that IDE would be nothing but a very thin re-branded wrapper of Netbeans IDE + Visual Web Pack with bundled JDK & Application Server.
But with that re-branded IDE, Creator user might miss certain features and end up with certain restrictions
Last but not least, Creator will be open sourced. When open sourced, it doesn't make sense to fork another open source IDE base to create yet another new IDE. The ideal choice is to release it as Visual Web Pack for Netbeans.
So, if any one asks my preference, my immediate answer is Netbeans + Visual web Pack. But the ultimate decision is left to the Creator users. Let your comments flow about your preference.
Posted at 09:43AM Nov 22, 2006 | Permanent link to this entry | Comments [29]
Releasing Sun Java Studio Creator as Visual Web Pack for Netbeans 5.5
As I mentioned in my earlier blog, Sun Java Studio Creator is soon to be released as Visual Web Pack (VWP) for Netbeans 5.5. A technology preview of the VWP will be available in early November. I'm really excited about this release, especially because the award winning web development techniques of Creator will be available side by side with other award winning technologies such as
all in a single IDE and certainly would reduce the IDE confusion.
Making the Creator as Visual Web Pack for Netbeans 5.5 has several advantages.
Visual web pack being part of Netbeans 5.5 has the following advantage
Posted at 08:02AM Oct 29, 2006 | Permanent link to this entry | Comments [7]
Creator Tip: How to create a Collapsible Group Table?
Another interesting feature of the Sun Java Studio Creator Table component, which many users might not be aware of, is the ability to collapse the Table Row Group. Interestingly the collapsing does not involve round trip to the server, so it is fast and convenient. I've created a small project for this tip which you can download from here.
Steps:
Deploy and the page in the browser would look like the image below.

Now click on the down arrow in the Trip Row group, you would see the row group collapsing immediately as shown in the image below.

Posted at 07:54AM Oct 24, 2006 | Permanent link to this entry | Comments [15]
Creator Tip: Specifying the sources for the debugger to step through
Few Sun Java Studio Creator 2U1 users raised the issue that while they are stepping through their code in the debugger, suddenly they are taken to code which are not written by them. For example, while trying to debug a Cached Data Provider related issue, they are taken to the actual Data Provider code that are not written by them, but comes bundled with Sun Java Studio Creator IDE.
The reason is, the sources related to Data Provider, Application Model and Web UI components are also bundled with Creator IDE. They are available in the directory <creator-install>/rave2.0/docs. Since they are added to the IDE library references for code completion, they also become part of debugger source level debugging.
However, you can tell the debugger not to step in to these bundled source, by deselecting them from the list of source jars/zips maintained by the debugger. To do this, invoke the window that displays the list of source jars/zips from View Menu -> debugging -> sources or use the keyboard shortcut Alt+shift+8.
In the Source Root / Filter Window deselect the source root which you do not want to step through. For example deselect the dataprovider-src.zip if you don not want to step through the bundled Data Provider source.
On the other hand you might want to step through source code of some external Library you have added to the project. To accomplish this, first you need to add a Library reference. Then add the source jar to the library reference. After invoking the Library Manager from Tools menu, create a New Library. Click on the Sources tab of the added new library reference and add your source jar to it by clicking on the Add Jar/Folder button. The added source jar will automatically appear in the Source Root / Filter window (shown above) which you can select for stepping through the code.
Posted at 09:42AM Oct 09, 2006 | Permanent link to this entry | Comments [6]
Creator Tip: Table component with a custom title bar
Another feature of the Sun Java Studio Creator 2U1 Table Component, that may be of interest is to have a custom title bar. This is also done very similar to the technique I explained in my blog on How to add the button panel to the table header.
Here is an example. Suppose you are running some process and periodically post the information about the process to a web page, where user can view output information of the process in a table. Suppose, if part of the process failed, you may want to display some message in the table title bar stating the process failed along with some error icon, which looks something similar to the below image.
Here are the steps to do this:
Here is the "title" facet code I used to make the above table title bar with red error icon and red colored text.
<f:facet name="title">
<ui:panelGroup binding="#{Page1.groupPanel1}" id="groupPanel1" style="text-align: left">
<ui:image align="middle" binding="#{Page1.image1}" icon="ALERT_FAILED_LARGE" id="image1"/>
<ui:staticText binding="#{Page1.staticText1}" id="staticText1"
style="color: #da3333; padding-left: 5px; padding-top: 10px; vertical-align: middle"
text="Process failed"/>
</ui:panelGroup>
</f:facet>
Also, it is possible to add a DropDown Component to the Table Component title bar as shown below.

Here is the "title" facet code I used to put the DropDown Component in the title bar.
<f:facet name="title">
<ui:panelLayout binding="#{Page1.layoutPanel1}" id="layoutPanel1"
panelLayout="flow" style="text-align: right">
<ui:dropDown binding="#{Page1.dropDown2}" id="dropDown2"
items="#{Page1.dropDown2DefaultOptions.options}"
style="text-align: right; width: 150px"/>
</ui:panelLayout>
</f:facet>
Posted at 11:48AM Sep 25, 2006 | Permanent link to this entry | Comments [8]
HotFix3 for Sun Java Studio Creator 2U1 released
Good news. HotFix3 for Sun Java Studio Creator 2U1 has been released. Apart from other fixes, this patch contains three main fixes.
If you have updated to HotFix2, then this patch is a must. So get it!
Posted at 08:31PM Sep 20, 2006 | Permanent link to this entry | Comments [8]
Adding multiple buttons to Table Component header
After reading my previous blog on Adding a button panel to the table component header, several Sun Java Studio Creator users asked me the question, how to add more than one button to Table component header?. Unfortunately the facet we used to set the button to the header panel does not seem to take more than one component. So, as suggested in the comment section, one way is to use some layout component and put more than one button in it. I tried with various layout components such as Grid, group Layout component etc. The best suitable one seems to be Group Layout Component.
Steps:
<!-- Actions (Top) -->
<f:facet name="actionsTop">
<ui:panelGroup binding="#{Page1.groupPanel1}" id="groupPanel1">
<ui:button action="#{Page1.button1_action}" binding="#{Page1.button1}" disabled="true"
onClick="if (confirmDeleteSelectedRows() == false) return false;"
id="button1" text="Delete"/>
<ui:button action="#{Page2.button1_action}" binding="#{Page2.button1}" disabled="true"
onClick="if (confirmDeleteSelectedRows() == false) return false;"
id="button1" text="Delete"/>
<ui:button action="#{Page3.button1_action}" binding="#{Page3.button1}" disabled="true"
onClick="if (confirmDeleteSelectedRows() == false) return false;"
id="button1" text="Delete"/>
<ui:button action="#{Page4.button1_action}" binding="#{Page4.button1}" disabled="true"
onClick="if (confirmDeleteSelectedRows() == false) return false;"
id="button1" text="Delete"/>
</ui:panelGroup>
</f:facet>
function disableActions() {
// Disable table actions by default.
var table = document.getElementById("form1:table1");
var selections = table.getAllSelectedRowsCount();
var disabled = (selections > 0) ? false : true;
// Set disabled state for top actions.
document.getElementById("form1:table1:button3").setDisabled(disabled);
document.getElementById("form1:table1:button4").setDisabled(disabled);
document.getElementById("form1:table1:button5").setDisabled(disabled);
document.getElementById("form1:table1:button6").setDisabled(disabled);
// Set disabled state for bottom actions.
document.getElementById("form1:table1:button2").setDisabled(disabled);
}
Deploy the application and you should see Table component with multiple buttons in the header as below. Initially buttons will be disabled. On selecting a row using checkbox the buttons will be enabled.
Posted at 12:15PM Sep 15, 2006 | Permanent link to this entry | Comments [19]
Creator Tip: Adding a button panel to the table component header
Sun Java Studio Creator Table component has more capabilities than being exposed by the Table Layout dialog. One of the features is the ability to add a button panel to the header or the footer of the table component. This tip shows how to achieve this simple task. I have created a sample project, which extends the Multi row selectable Table Component tip project and adds button panels to the header and footer of the table component. User can select one or more rows from the table and then click the delete button in the header or footer to delete the rows. This sample project can be downloaded from here.
Also, I have included Java Script to the Table Component to pop up a confirmation dialog asking if the rows should be deleted. Also the dialog would warn that the action can not be undone. Also the Java Script would dynamically enable or disable the buttons based on the selection of the rows.
Steps:
<!-- Actions (Top) --><f:facet name="actionsTop">
<ui:button action="#{Page1.button1_action}"
binding="#{Page1.button1}" disabled="true" id="button1"
onClick="if (confirmDeleteSelectedRows() == false) return false"
text="Delete"/>
</f:facet>
<!-- Actions (Bottom) -->
<f:facet name="actionsBottom">
<ui:button action="#{Page1.button2_action}"
binding="#{Page1.button2}" disabled="true" id="button2"
onClick="if (confirmDeleteSelectedRows() == false) return false"
text="Delete"/>
</f:facet>
function confirmDeleteSelectedRows() {
var table = document.getElementById("form1:table1");
return table.confirmDeleteSelectedRows();
}
function disableActions() {
// Disable table actions by default.
var table = document.getElementById("form1:table1");
var selections = table.getAllSelectedRowsCount();
var disabled = (selections > 0) ? false : true;
// Set disabled state for top actions.
document.getElementById("form1:table1:button1").setDisabled(disabled);
// Set disabled state for bottom actions.
document.getElementById("form1:table1:button2").setDisabled(disabled);
}
public String button1_action() {
int selectedRows = getTableRowGroup1().getSelectedRowsCount();
RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
for(int i=0; i< selectedRowKeys.length; i++){
if (tripDataProvider.canRemoveRow(selectedRowKeys[i])){
tripDataProvider.removeRow(selectedRowKeys[i]);
info("Row " + selectedRowKeys[i].getRowId() + " Removed");
}else{
info("Can not remove row " + selectedRowKeys[i].getRowId());
}
}
tripDataProvider.commitChanges();
if(selectedRowKeys.length < 1){
info("No rows selected for deletion");
}
return null;
}
That is it. We are done. Deploy the application. Initially the buttons will be disabled. Select a row and the buttons will be enabled. Click on the button and the confirmation dialog (shown below) should popup.
Posted at 09:18PM Sep 10, 2006 | Permanent link to this entry | Comments [24]
Sun Java Studio Creator Web based training
A web based training course is now available for Sun Java Studio Creator users.
Title: Creating Web-Tier Applications Using the Visual Development Environment (WJO-1106)
Version: A.0
Release Date: 2006-07-29
Course Description - This course explains how to develop web applications using Sun Java(TM) Studio Creator 2 tool. In this course, students learn about the various components in the visual interface of the Sun Java Studio Creator 2 tool. This course also explains how to create, navigate, deploy, and secure web applications using Sun Java Studio Creator 2 tool.
Who Can Benefit - Architects, domain experts, Java and web applications developers. This course is designed for those who want to use the Sun Java Studio Creator 2 as a RAD tool to develop web applications without going into technical details.
Prerequisites - To success fully complete this course, you should be able to demonstrate familiarity with the basics of Java technology and web architecture.
For more details visit http://www.sun.com/training/catalog/courses/WJO-1106.xml
Posted at 07:16AM Sep 06, 2006 | Permanent link to this entry | Comments [0]
Redploying to Tomcat Server from Java Studio Creator
The Web Application Created using Sun Java Studio Creator can be deployed to other Web Servers such as Tomcat Web Server. See the Online Help for more details.
However, some customers noticed that every time they deploy the Web Application that has been exported as War file, they have to restart the Tomcat Server when the war file is being redeployed again. The reason is the War wouldn't get redeployed because some jars get locked. I think most probably this problem may occur on Windows.
Thanks to Haroon A. of Motorola, now we have a solution to fix this problem. The following is from his posting.
The problem is Tomcat locks up some jar files in the web-inf/lib
directory, and so the undeploy can't happen. Therefore Tomcat has to be
shutdown, and directory deleted before another version of the WAR file can be
deployed.
Here is how I solved this problem:
I found that I have to add a file META-INF/context.xml with the following
contents:
<Context antiJARLocking="true" antiResourceLocking="true">
And everything (undeploy / deploy / hot-deploy) worked fine after that!
</Context>
Posted at 08:02AM Sep 05, 2006 | Permanent link to this entry | Comments [7]
Deploying Java Studio Creator 2U1 developed application to Glassfish
As Glassfish, the open sourced Java EE 5 Sun Application Server PE 9, is becoming popular, Java Studio Creator users are increasingly interested in deploying their web application to Glassfish. In the forth coming release of Creator, Glassfish will be directly supported. However, it may be possible to deploy the web application created using Sun Java Studio Creator 2U1. So I was looking at what it takes to deploy the Creator 2U1 application to Glassfish. As Marco pointed out, you can simply deploy the exported war file from Creator using Glassfish admin console. It works!
However, you have another option. That is to use latest and greatest JSF 1.2 built inside Glassfish, rather than the older version of JSF 1.1 bundled inside the exported war file. Note, JSF 1.2 is fully backward compatible. So the JSF application built with Creator 2U1 will work with the JSF 1.2 runtime bundled with Glassfish with out any modification.
In order to use the JSF 1.2 runtime do the following
Note, you have to set up your datasources manually if any data connections are used in the Creator developed application. Also don't forget to manually copy the JDBC driver jars to the Glassfish lib directory. Read Chapter 2 of Glassfish Administration Guide to find details on how to set up the JDBC resources.
Suggestion: Use the Glassfish release V1 UR1 Build 08 or later, as the latest version of JSF 1.2 with many bug fixes are integrated in to this build.
Posted at 10:39AM Aug 28, 2006 | Permanent link to this entry | Comments [3]
Java Studio Creator 2 performance patch is released - a must for evey Creator user.
Performance .. performance .. performance. We heard it and we heard it enough. "Enough is enough" said our Engineering manager, Mark Dey and thus born the Performance tiger team. The primary and only focus of this team is to improve the performance of Sun Java Studio Creator. The team members dropped what ever they are working on for the forth coming releaser, code name shortfin - bundling Creator as a pack for Netbeans 5.5 and jumped on to the band wagon to work on the performance of the current release - Java Studio Creator 2 U1. I had the privilege of leading this team. The patch would not have happened with out the salient efforts of the team engineers Sandip Chitale, Peter Zavadsky, Devananda Jayaram and Marco Walther. These guys are phenomenal.
Having said that, it is the QA team lead by Sakthivel Gopal that made the patch perfect for release. I must mention the excellent contribution from our QA engineers Krystyna Polomski, Sherry Zhou, Lark Fitzgerald, Chary Kanaparthi, Sandeep Jangity, Moumita Nandi and our Russian QA engineers Oleg Khokhlov & Alexey Butenko. With out this team it would be next to impossible to pin point the potential areas otherwise this patch would have broken.
Last but not least, I must mention the over all co-ordination by one of our Project Leads Chau Nguyen to bring these teams together, Mario Ramon to put together the patch processing and Ashvini Mangalvedhekar for taking care of release engineering efforts.
It was a great ride for the past four weeks with lot of ups and downs. But in the end, it was worth a ride when we put together the final results of these efforts (further details).
So, download and enjoy the patch. Note, we are not done yet. This team will continue to keep an eye on performance and memory issues. Above all, it is your, Creator users, inputs that are most valuable for us. So let them keep coming and you can send your comments to the e-mail address creator-feedback@sun.com.
Posted at 10:42PM Aug 25, 2006 | Permanent link to this entry | Comments [4]
Testing if Object List Data Provider is transactional?
A question came up in the forum about ObjectListDataProvider, asking if ObjectListDataProvider is transactional?.
According to the Java Doc of ObjectListDataProvider:
This class implements
TransactionalDataProvider semantics, meaning that
all updates to existing fields, as well as inserted and deleted rows, are cached
until commitChanges() is called. Once that call
is made, any RowKey you have retrieved from this
instance is invalid, and must be reacquired.
So, I decided to test this and created a test project which can be downloaded from here.
This project is an extension of the sample project I put in my previous blog http://blogs.sun.com/roller/page/winston?entry=objectlistdp_sample_project. So the work around steps explained in that blog must be followed.
In this project, I additionally added two components and modified the Table component as follows
When the button is clicked and the page is submitted, the button event listener does the following
The code in the button action handler looks like this.
public String button1_action() {
Name addedName = new Name("Gabriel", "Galvao");
this.getSessionBean1().getNameListDataProvider().appendRow(addedName);
this.getSessionBean1().getNameListDataProvider().commitChanges();
List myList = getSessionBean1().getNameListDataProvider().getList();
for(int i=0; i< myList.size(); i++){
info("Full Name: " + ((Name)myList.get(i)).getFirst() + " " + ((Name)myList.get(i)).getLast());
}
return null;
}
Following images show the results before and after the page is submitted. Before submitting the page, I changed the last name of Jeff Hudson to Jeff Jackson which is correctly displayed in the MessageGroup along with the added name Gabriel Galvao after the page is submitted. So, as we see through this sample ObjectListDataProvider is indeed transactional.
Posted at 09:31AM Aug 05, 2006 | Permanent link to this entry | Comments [10]
What is this Data Provider in Sun Java Studio Creator anyway?
Before defining Sun Java Studio Creator Data provider framework, we need to take a look at the definitions of Data Source and Data Binding.
Data Source can be defined as a piece of software that represents information stored in physical media such as Database.
Data Binding associates underlying data to the User Interface (UI) elements. The data holds the information and UI elements render the information in a user perceivable form. Data binding can be read only - information from the Data Source flows only to the UI elements. Alternatively, Data Binding can be read and write. In read/write mode, data binding facilitates information flow in both direction - from the Data Source to the UI element, as well as from the UI element to the Data Source.
Creator Data Provider is a simplified Data Access architecture for Data Binding, offered with better maintainability in mind. Data provider is an abstraction over Data Source to provide a flexible and uniform data binding mechanism. Traditionally, Data Sources are linked to database connection using via technologies such as JDBC Rowset. However, in real world the source of the data can be in other forms, such Java Collection Objects (List, Map etc) or can be an array of POJOs (Plain Old Java Objects) as supported by technologies such as Hibernate and EJB3. Data Binding to these different sources of data is a hoard of different techniques. When these different Data Sources are wrapped by the Data Provider layer, a uniform binding mechanism can be realized. So effectively Data Provider is a bridge between Data Source and UI element to provide a single mechanism for data binding. UI elements access the data from these Data Sources through specific Data Provider API with out the need to understand the Data Source specific data access format.
Even though Creator directly supports the built in Data Provider Data Binding framework, there are other frameworks that can be potentially used for Data Binding in a Creator Application. To name a few
In my next blog, I'll try to give more details about the Data Provider framework itself.
Posted at 11:12PM Jul 16, 2006 | Permanent link to this entry | Comments [6]