当前位置: 首页 > 网络学院 > 客户端脚本教程 > APPML > AppML HTML 列表
The <htmllist> element contains the elements of an HTML list.
<htmllist>元素嵌套了一个HTML列表的元素。
By adding an <htmllist /> element after the <database> element, the AppML List Service will generate an HTML list based on the SQL defined in the <database> element. Previous/Next/First/Last buttons will automatically be added. If there is a <filters> element, a "Filter" button will also be added.
通过在<database>元素之后添加一个<htmlreport />元素,该AppML报告服务将产生一个基于定义在<database>元素中SQL的HTML报告;“Previous [上一页]/Next [下一页] /First [首页] /Last [末页] ”按钮将会自动被添加进去。如果是一个<filters>元素,“Filter [过滤]”按钮也会被添加进去。
Note: When working with HTML lists and forms, the <keyfield> and <maintable> elements must be present in the <database> element:
注意:当与HTML列表和表单一起运行时,<keyfield> 和 <maintable>元素必须存在于<database>元素:
<?xml version="1.0" ?> <appml> <database> <htmllist /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果
View the XML source file
查看XML 源文件
An example of an editable HTML list:
可编辑的HTML列表案例:
<?xml version="1.0" ?> <appml> <database> <htmllist edit="true" /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果
View the XML source file
查看XML 源文件
An example of an HTML list with filter function:
包含过滤函数的HTML列表的案例:
<?xml version="1.0" ?> <appml> <title>CUSTOMERS</title> <database> <filters> <orderselect> <htmllist /> </appml> |
View the output produced by the AppML HTML List Service
查看由AppML HTML 报告服务输出的结果
View the XML source file
查看XML 源文件
To create more advanced HTML lists, look at the examples in the attributes and child elements below.
创建更多高级的HTML列表,见下面的属性案例和子元素列表中的案例。
The <htmllist> element may have the following attributes:
<htmllist>元素可以包含下面这些属性:
Attribute 属性 | Value 值 | Description 描述 |
---|---|---|
edit | true | Defines an editable HTML list 定义一个可编辑的HTML列表 |
delete | false | Removes the "Delete" button (garbage can) from the list. Only available in an editable HTML list 从列表中删除“Delete [删除]”按钮(垃圾桶图标)。仅能在可编辑的HTML列表中使用 |
maxlines | number | Specifies the maximum number of records to show on each page 指定页面所显示的最大记录数 |
navigate | false | Removes the "Previous/Next/First/Last" buttons from the HTML list 从HTML列表中删除“Previous [上一页]/Next [下一页] /First [首页] /Last [末页] ”按钮 |
new | false | Removes the "New" button from the list. Only available in an editable HTML list OR if a <htmlform> element is presented 从列表中删除“New [新添]”按钮。如果<htmlform>元素存在,那么可以在可编辑的HTML列表中使用 |
reporttarget | URL | Specifies the report in an external XML file to be executed when clicking on the "Report" button in the HTML list 当点击HTML列表中的“Report [报告]”按钮之后,指定位于外部XML文件中用于执行的报告 |
search | false | Removes the "Filter" button from the HTML list 删除HTML列表中的“过滤”按钮 |
window | _self | Where to open the report? 指定打开报告的地址 |
The <htmllist> element may have the following child elements:
<htmllist>元素可以包含下面的字元素:
Element 元素 | Description 描述 |
---|---|
displaysql | |
elements | A container for the data fields in an editable HTML list that should fulfill special criterions 在一个可编辑的HTML列表中指定数据字段的容器,它符合指定的标准以及条件 |
footer | Defines a footer that will be displayed after the HTML list output on the page 定义一个显示在HTML列表页面之后的页脚 |
header | Defines a header that will be displayed before the HTML list output on the page 定义一个显示在HTML列表页面之前的页眉 |
script | A container for scripts that can be executed from everywhere inside the HTML list 指定在HTML列表中用于在任何地方执行的脚本容器 |
stylesheet | Defines a stylesheet for the HTML list 为HTML列表定义一个样式表 |
sql | Defines an SQL statement for the HTML list 为HTML列表定义一个SQL语句 |
table | Provides a way to define the style and layout of the list table 提供一个定义样式和列表布局的方式 |
td | |
title | Defines a title for the HTML list 为HTML 列表定义一个标题 |