Querying Oracle 10G XE using Sun Java Creator 2 - Displaying the Query results
(Page 5 of 5 )
In order to display the rows returned by the query you can add a table to the page and bind the data to the table. Drag and drop a table from the "palette" to the page. The table object gets added to the page in the design view. The default of five columns and three rows should be displaying as shown. Now right click the table, and from the context sensitive menu click on the Bind to data...short cut.

This opens the window named Table Layout showing the defaultTableDataProvider. You may click on the drop-down for data provider which will show the employeesDataProvider.

Choose the employeesDataProvider and click on the OK button. This opens the next window showing all the columns that were chosen to be displayed as shown. You may use the arrow keys as well as the up/down keys to reorder the columns as well as choose not to include some of the previously chosen columns. Here two of the previously chosen ID columns have been removed from display.

Displaying the web page
Now all that is necessary is to apply some style information to the page, modify the title, add some text for the page footer, and so forth. Some of these activities were discussed in the previous article. Here only the title of the table was changed and a footer was added. Now build the page and click on the run button in the main menu. The displayed page appears as shown below.

Summary
In addition to having an extremely user friendly data connectivity interface, Creator 2 has an equally impressive, user friendly query editor utility that makes it very easy to modify queries. There are hardly any differences between the Creator 2 interface and the VS 2005 interface with regard to modifying queries.
The creation of a validation table is only a small additional step which, once created, may be used for any number of connections. It should be noted that not once was the Java source shown to the user. The reader will benefit from reading the other Java-related articles at the DevArticles.com web site. Perhaps the only experience that is different from the Microsoft IDE is the slower speed with which the various windows show up during the design as well as the first time the page loads in the browser.
| 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. |