<response>
.<row>
element per row._
) replaced by dashes (-
). dept_no
column end up in <dept-no>
.departments
table of your relational database.jdbc/
part. If you type employees
, Orbeon Forms will look for java:comp/env/jdbc/employees
.server.xml
, there add a <Context>
for Orbeon Forms if you don't have one already, and inside it add a <Resource>
pointing to your database. On Tomcat, you also need to put the database JDBC driver in Tomcat's lib
directory.list-departments
. Here is how the user interface looks like:/response/row
. Next, you need to tell Orbeon Forms where it can find, inside the <row>
, the label (the text shown to users) and the value (what is stored in data when users make a selection).<dept-no>
element, is used to populate the element corresponding to the field in the form data.<sql:param type="xs:string" select=""/>
. The type
attribute corresponds to the SQL type to use (e.g. xs:string
, xs:decimal
, …). The select
attribute must be left blank; it is filled-out by the Actions Editor when the service is called.employee-id=100
to your form, and want to load data from a relational database about the employee with specified id, this to pre-populate some fields, such their first name, last name, hire data, and department, as shown in the screenshot below.employee-id
, and in the Formulas tab, set its Initial Value to xxf:get-request-parameter('employee-id')
.employee-id
field, and setting the value of the first name, last name, hire data, and department fields to values returned by the SQL query.employees
table used by the above query. After you publish the form, try opening its /new
page, passing the request parameter ?employee-id=100
.