1. Join Tables to List and Display Groups
2. Customizing Queries
3. Bug Fixes
4. Documentation
1. Join Tables to List and Display Groups
With this release it is possible to join tables to groups of type list and display, respectively. Using a join makes it is possible to display information not only from the table corresponding to a particular task but also from related tables. As an example consider the following Student Task.
<bf-app:task table="student"> <bf-app:task name="course_list" table="visit"> <bf-app:group type="list"> <bf-app:field name="institute_name" label="Institute"/> <bf-app:field table="professor" name="id" alias="professor_test_id" label=""/> <bf-app:field table="professor" name="name" label="Professor"/> <bf-app:field table="course" name="id" alias="course_test_id" label=""/> <bf-app:field table="course" name="title" label="Course" link="true"/> <bf-app:join table="course" on="visit_ref_course"> <bf-app:join table="professor" on="course_ref_prof"/> </bf-app:join> </bf-app:group> </bf-app:task> </bf-app:task>
The tables course and professor are joined to
the visit table for displaying the course's title and
the professor's name. Note that the fields course.id
and professor.id is given an alias because each field
of a group needs a unique identifier. When thinking about
identifiers, have in mind that each group is extended by
<b-frame/> to include all primary key attributes (but
only the defined attributes occur on a mask).
2. Customizing Queries
By default, the query of a top level task allows user input for the primary key fields. With this release it is possible to define these fields by using the <bf-app:query> and <bf-app:infix> tags.
<bf-app:task table="student"> <bf-app:query> <bf-app:infix name="and"> <bf-app:field name="id" label="ID"/> <bf-app:field name="name" label="Name"/> </bf-app:infix> </bf-app:query> </bf-app:task>
The <bf-app:infix>'s name attribute defines the operator, e.g. and or or. <bf-app:infix> tags may be nested.
Note that currently it is not possible to include fields
from other, joined tables into the condition of the query,
this will become available in the future.
3. Bug Fixes
The tutorial at http://www.b-frame.org/applications.pdf has been updated.
|