前台JSP--/demo_my/EAPDomain/app/pages/samples/server/norole/norole.jsp
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</meta>
<title>動态級聯</title>
<%@ include file="/unieap/ria3.3/pages/config.jsp" %>
<script type="text/javascript" src="<%=appPath%>/pages/samples/server/norole/norole.js"></script>
</head>
<body class="unieap">
<div style="width:100%;">
<div id="rightContent" style="float:left;width:50%;">
<div dojoType="unieap.layout.TitlePane" title="地區管理" style="height:350px">
<form id="empForm" jsId="empForm" dojoType="unieap.form.Form" binding="{store:'area',bindIndex:1}">
<fieldset dojoType="unieap.form.FieldSet" title="地區資訊">
<table width="100%" style="table-layout:fixed" >
<colgroup>
<col style="width:70px;"></col>
<col style="width:auto;"></col>
<col style="width:20px;"></col>
</colgroup>
<tr style="height:40px">
<td><label> 城市: </label></td>
<td colspan="2"><div binding="{name:'NAME'}" dojoType="unieap.form.ComboBox"
dataProvider="{store:'area'}"
decoder="{displayAttr:'NAME',valueAttr:'ID'}" width="100%"></div></td>
</tr>
<tr style="height:40px">
<td><label> 縣、區: </label></td>
<td colspan="2"><div binding="{name:'NAME'}" id="area" dojoType="unieap.form.ComboBox"
dataProvider="{store:'area'}"
decoder="{displayAttr:'NAME',valueAttr:'ID'}" width="100%"></div></td>
</tr>
<tr style="height:40px">
<td><label> 公司: </label></td>
<td colspan="2"><div binding="{name:'NAME'}" dojoType="unieap.form.ComboBox"
dataProvider="{store:'area'}"
decoder="{displayAttr:'NAME',valueAttr:'ID'}" width="100%"></div></td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</div>
</body>
</html>
無背景JS業務處理--/demo_my/EAPDomain/app/pages/samples/server/norole/norole.js
dojo.addOnLoad(function(){
init();
});
function init(){
var dc = new unieap.ds.DataCenter();
var store=new unieap.ds.DataStore("area");
store.setRowSetName("areaStore");
dc.addDataStore(store);
//調用查詢方法,傳回dc
unieap.Action.doQuery(store);
var ds = dataCenter.getDataStore("area");
//重新綁定資料源
unieap.debug(ds.getRowSet());
var row=ds.getRowSet().getRow(0);
var form=unieap.byId('empForm');
form.getBinding().bind(row);
}