日期:2014-05-16  浏览次数:20499 次

json 异步处理
public String queryPlanFormByCode()
{
final List<PlatForm> planFormLst = new ArrayList<PlatForm>(KeyConstant.INITIAL_NUMBER);

JSONArray jsonArray = JSONArray.fromObject(planFormLst);

String jsonData = jsonArray.toString();

return jsonData ;
}

//查询企业对应的域编号
function queryPlanForm(Code)
{
var Code = document.getElementById("Code").value;
buffalo.remoteCall("appCodeManagerBuffalo.queryPlanFormByCode", [ Code ],
function(reply) {
var result = reply.getResult();
var res = eval('('+ result +')');
var planCode = document.getElementById("platformId");
var len = res.length;
var planForm = null;
planCode.options.length = 0;
for (var i=0;i<len;i++)
{
planForm = res[i];
planCode.add(new Option(planForm.pid,planForm.pid));
}
});
}


<bean name="buffaloConfigBean"
class="net.buffalo.service.BuffaloServiceConfigurer">
<property name="services">
<map>
<entry key="appCodeManagerBuffalo">
<ref bean="appInfoManager" />
</entry>
</map>
</property>
</bean>

<bean id="appInfoManager"
class="enterpriseApp.manager.impl.AppInfoManagerImpl">
<property name="appInfoDao">
<ref bean="appInfoDao" />
</property>
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
</bean>


<select name="appInfo.platformId" id="platformId" style="width: 138px">
<option value="">请选择..</option>
</select>