Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Creating a Data Table with the JSF API


In the previous section, we generated a Data Table from a static query in a Web service client class. In this section we will generate a Data Table from a dynamic query specified in the JSF page. We will use the Create Data Table Wizard to bind the Data Table to a specified number of columns and in the backing bean generate the Data Table with the JSF API. The procedure to create a Data Table from a database table with the JSF API is as follows:

  1. 1. Create a JSF Page.

  2. 2. Add an Input Text JSF component to the JSF page. We will use the Input Text to specify an SQL query from which the Data Table will be generated.

  3. 3. Add a Command Button from the Component Palette to submit the SQL query. We will bind the command button to a backing bean method with which we will create the Data Table.

  4. 4. Add a Data Table from the Component Palette. In the Create Data Table Wizard specify the number of columns to match the number of columns in the database table from which...