To create an embeddedServiceRequest, 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. Right click in the UI file, or on a table, tree, tree-table, listbox or combobox component and select Data Services > Create Service Request.
The Create Service Request wizard starts.
Figure 104: Create Service Request wizard
2. Click embeddedServiceRequest and click Next.
A Create EmbeddedServiceRequest dialog appears.
3. Complete the Create EmbeddedServiceRequest dialog as follows:
|
|
ID: Nexaweb Studio automatically assigns each embeddedServiceRequest an ID of embeddedServiceRequest with a numbered suffix incremented by one for each additional embeddedServiceRequest created. Use the provided ID or enter your own. onFailure\onSuccess: Optionally, specify an MCO or Macro to run when the request fails or succeeds. Click Advanced to create one. For more information on creating an event, see Connecting Business Logic to the User Interface. Target: Specify an existing document data source through which you can bind this data to the UI, or click New to create one. Nexaweb Studio copies the data from the data base to the document data source for use in the UI. For more information on creating a document data source ,see Creating a Data Source. Create SQL Request/Specify SQL Request: 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, choose the Specify SQL Request option.
|
4. Click on the type of statement to create and click Next.
A Create sql Statement dialog appears.
5. Complete the Create sql Statement dialog as follows:
|
|
ID: Nexaweb Studio automatically assigns an ID as the statement type, with a suffix incremented by one for each additional statement of this type created. You can 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 use to access the database. StatementHandlerId: Specifies the ID of the statementHandler to use. Table: Displays the name of 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 click 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.