Adding an embeddedServiceRequest From the Data Source Explorer View

To create an embeddedServiceRequest from the Data Source Explorer view, follow these steps:

1. Open the Nexaweb Data Services perspective: select Window > Open Perspective > Other and select Nexaweb Data Services from the list of perspectives.

2. Click + besides Databases in the Data Source Explorer view to expand the list.

3. Right click on the database to use and select Connect.
A database Schema tree appears.

4. Drag a table or column from the Data Source Explorer view onto the UI file, or a table, tree, tree-table, listbox or combobox component
The
Create SQL Service Request dialog appears.

image\img00208.gif

Figure 105: Create SQL Service Request dialog

5. Click on the type of statement to create and click Next.
Note: The pre-defined SQL statement types allow you to create an SQL statement using From and Where grammar only. To use additional SQL grammar in a statement, select the SqlStatement type.
A
Create Sql Statement dialog box appears specifying the type of statement you selected.

7. Complete the Create Sql Statement dialog as follows:
Note: If you selected to create an SqlStatement type, the following dialog box contains an empty text box below the Attribute Settings, where you enter a free-form SQL statement.

 

image\img00209.gif

ID: Nexaweb Studio automatically assigns an ID as the statement type, with a numbered suffix incremented by one for each additional statement of this type created. Keep the assigned ID or specify your own. Nexaweb Studio uses this ID to identify this SQL statement in the nexaweb-sql.xml file and to identify the dataRequestDefinition in the nexaweb-data.xml file that references this SQL statement.

ConnectionId: Specifies the ID of the connection to the database which you want to access.

StatementHanlderId: Specifies the ID of the statementHandler to use.

Table: Displays the table selected from the database in the text field, and the entire database schema in the list box from which you can select any table with which to work.

Columns: Displays the columns of the selected table. A check-mark appears in the checkbox beside each column of the table this SQL statement will affect. Click Select All or Deselect All, or the check box beside an individual column to change its selection. To change the order in which data from these columns appear in the UI, click on a column and click Up or Down to move it.

 Click Finish.

 Nexaweb Studio adds the embeddedServiceRequest to the UI file and displays its ID under the Embedded Service Requests folder in the Data view. Nexaweb Studio also automatically creates a documentDataSource as a target for this embeddedServiceRequest in the UI file and displays its ID in the DataSources folder in the Data view.