Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
 Now you need to create your form that integrates with your database queries.

There are two ways of creating  forms:

  • dragging and dropping controls from the designer palette
  • creating a form from an XML schema. In this case, the controls will be automatically created for you based on the XML schema definitions.

When working with the database connector, you will always used use the latter and create the controls from the schema. In the future we intend to relax this requirement.

Column
width240px

On this page:

Table of Contents
maxLevel1

...

The first screen in the wizard is for the form's default document. This is indicated by the Document Name of "default" displayed in the wizard. The default document maps to all of the controls you added to this form by dragging a dropping and  dropping from the palette. This is typically not the document you want to configure.

  1. Click the Next button to advance from the default document to the next schema documentYou . You should see the Document name change to your schema's document name
  2. Enter the database connector Url to your query in the wizard's URL input. If the database connector is running in the same host and port as the  form server, then you can omit http://<host>:<port>/ from the URL. See this example below.

Image RemovedImage Added

You also must specify which of the four SQL statements to run—you do this by choosing the appropriate values in the Document URI Read Method and Document URI Write Method dropdowns according to the table below. (You may notice in the Forms Designer that the Document URI Read Method drop down box includes a POST option, but it is not shown below because it is not used by the database connector.)

...

Code Block
http://localhost:8082/database/myStore/customers?customerId={customerId}

If you choose the Write method to be POST, the SQL statement that will be executed is:

Code Block
<create>               
 <statement>
 INSERT into customers (customerId,firstname,lastname)      
 VALUES ({customerId},'{firstname}','{lastname}')
 </statement>          
</create>

...