关于下拉框的限制问题
更新时间: 周三, 11/14/2007 - 10:31
各位高手,小弟初学xml,在写配置文件时遇到下拉框限制的问题.具体是,有三个下拉框,第一个是一级字典,第二个是二级字典,第三个是三级字典.二级字典是在一级字典选定后的结果集作为查询条件的,三级字典是由前两个选定的结果集体决定的.
我该如何写关于这三个的xml?
附上代码
<field>
<name>firstclasscode</name>
<fieldtype>string</fieldtype>
<edittype>select</edittype>
<filllistsql>select firstclasscode,firstclassname from ds_1classwork</filllistsql>
<fillitem>,---请选择---</fillitem>
<readonly>false</readonly>
</field>
<field>
<name>secondclasscode</name>
<fieldtype>string</fieldtype>
<edittype>select</edittype>
<filllistsql>select secondclasscode,secondclassname from ds_2classwork where firstclasscode=%firstclasscode%</filllistsql>
<fillitem>,---请选择---</fillitem>
<readonly>false</readonly>
</field>
<relations_linkage>
<initiative>firstclasscode</initiative>
<linkagetype>restrict</linkagetype>
<functionstring>select secondclasscode,secondclassname
from ds_2classwork
where firstclasscode=%firstclasscode%
</functionstring>
<restrictobject>secondclasscode</restrictobject>
</relations_linkage>
<field>
<name>threeclasscode</name>
<fieldtype>string</fieldtype>
<edittype>select</edittype>
<filllistsql>select threeclasscode,threeclassname from ds_3classwork where firstclasscode=%firstclasscode% and secondclasscode=%secondclasscode%</filllistsql>
<fillitem>,---请选择---</fillitem>
<readonly>false</readonly>
</field>
参考文章:
网站导航