Displaying Data from a Data-centric Web Page with Sun Java Creator 2 - Displaying the Data
(Page 4 of 4 )
Well this is all that is necessary to display the data in a table. Just Build the project and Run by clicking the Build and Run buttons in the main menu. It will be highly informative if you would try to follow how the project gets built (8 seconds to build the first time). When you run the project the Page returns the data retrieved from the database, populating the table as shown. Even the foreign sounding names came up without a fuss.

It is quite impressive considering the fact that not a single line of code was written. You may also sort the columns by clicking on the up/down arrows in each column, which also shows a pop-up describing what you will be achieving by clicking them. The Hyperlinks of the column names can also be used for sorting, when clicked.
Prettying up the table
You may use a style sheet to change the display of the table. You may also change the style in the Properties of any element which gets displayed when the item is highlighted in theDesignpane. For styling, the user interface is very flexible. Style can be applied to individual elements, or to the whole group, and by external sources. The next picture shows the window for applying the style to the table. To bring up this window you need to click the style property when the Table's property page is open.

The next page which has been prettied up (in the most horrible way) shows some changes applied to the Style property in the properties page of the elements. The Customer ID column has been sorted as well in this display.
Summary
The Sun Java Studio Creator 2 is a very user friendly interface for creating web pages with data display capabilities. No code needs to be written for data display, and the data retrieval from any data source is simplified by the excellent user interface available to bring in data from a variety of sources. The fine-grained control of displayed data, and the possibility of using the scripting support would make it possible to deliver rich Internet applications quite easily.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |