|
前台JS
var aircodeEdit = $('#aircodeEdit').combobox({
url:'airlinesAction!doListAirlines.action',
mode:'remote',
valueField:'aircode',
editable:false,
textField:'airlinesname',
onSelect:function(record){
$('#airlinesnameEdit').val(record.airlinesname);
tripwayidEdit.combobox({
url:'tripWayAction!doListTripWay.action?aircode='+record.aircode,
mode:'remote',
valueField:'obid',
editable:false,
textField:'tripname',
onSelect:function(record){
$('#tripnameEdit').val(record.tripname);
}
}).combobox('clear');
}
});
var tripwayidEdit = $('#tripwayidEdit').combobox({
url:'tripWayAction!doListTripWay.action?aircode='+aircodeEdit.val(),
mode:'remote',
valueField:'obid',
editable:false,
textField:'tripname',
onSelect:function(record){
$('#tripnameEdit').val(record.tripname);
}
});
后台action方法
public void doListTripWay(){
String aircode = this.getRequest().getParameter("aircode");
writeJson(tripWayService.findTripWayByAirCode(aircode));
}
|
|