|
Next: androPage Smarty
androPage YAML SpecificsThe androPage system reduces the amount of code that you need to write (and maintain) by replacing code with a simple data file. A single data file can be used to produce output in several useful forms. The data file describes three fundamental things:
We will now see what you can provide for these. Here is the example we will work with: options:
title: Customer Report
table customers:
column customer:
column description:
column amt_order:
compare: between @amt1 and @amt2
column amt_paid:
column amt_balance:
uifilter amt1:
type_id: numb
colprec: 10
colscale: 2
description: Minimum Balance
uifilter amt2:
type_id: numb
colprec: 10
colscale: 2
description: Maximum Balance
File Name and FormatThe file should be named --name--.page.yaml, and should be in your application directory. Links can reach the page by specifying the parameter "gp_page", as in "index.php?gp_page=myexample". The link should not specify the ".page.yaml" part. The One Option: TitleAs of this writing, March 2008, there is only one option, which is the page's title. options:
title: Customer Report
FiltersandroPage requires at least one filter. Each filter is specified as "uifilter --name--:". You must supply a type_id at least, and for numerics and characters a colprec (column precision, i.e., size). A description is also required. uifilter amt1:
type_id: numb
colprec: 10
colscale: 2
description: Minimum Balance
uifilter amt2:
type_id: numb
colprec: 10
colscale: 2
description: Maximum Balance
The Tables and ColumnsThe heart of each androPage YAML file is a list of tables and columns. Here are the basic ideas to keep in mind when you specify tables and columns:
All of the options available here apply to columns. You can specify the following options for a column:
This early version of androPage has a problem with the ORDER BY feature, it is not yet working.
Next: androPage Smarty
|
