日期:2014-05-19  浏览次数:20801 次

求jsp部分增加的写法
后台

public ArrayList savemess() {
commandContext.clear();
commandContext.setCommandName("newSystemCommonVOs");
commandContext.setServiceName("systemCommonService");
SystemCommonVO vo = new SystemCommonVO();
vo.setTablename("T_BaseInfomation");
commandContext.setCommandParams(new Object[] { vo },
new Class[] { SystemCommonVO.class });
ArrayList list = (ArrayList) this.executeCommandContext().getResult();
return list;
}
jsp部分
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK" %>
<html>
<head>
<style language="javascript" type="text/css"></style>
<link rel="stylesheet" href="/portal/css/list.css" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/util.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/interface/getall.js"></script>
<script language="javascript">



function selecttype(){
getall.Types(callbacks);
}
function callbacks(data){
DWRUtil.addOptions("ses", data,"T_ID","T_Name");
}
function selectproper(){
getall.Properties(callback);
}
function callback(data){
  DWRUtil.addOptions("selectes",data,"P_ID","P_Name");
}
</script>

</head>
<body onLoad="selecttype(),selectproper()">
<form>
<table cellSpacing="0" cellPadding="0" width="312" align="center"border="0">
  <tr ">
  <td width="70%" valign="top">
  <table cellspacing="0" cellpadding="0" align="center" border="0" style="border-width: 0px;">
<tr>
<td colspan="2" height="30">
<div align="center" class="STYLE1">
资产基本信息</div>
</td>
</tr>
<tr class="FormItemStyle">
<td height="30">资产名称:  
</td>
<td>
<input type="text" maxlength="100" id="F_Name"
class="input_select" />
</td>
</tr>

<tr>
<td height="30">
资产类别:  
</td>
<td><select id="ses" name="ses"></select></td>
</tr>
<tr>
<td height="30">资产性质: </td>
<td><label>
<select name="selectes" id="selectes">
</select>
</label></td>
</tr>
<tr>
<td height="30">
资产编号: </td>
<td>
<input type="text" maxlength="100" id="F_SaveClass"
class="input_select" />
</td>
</tr>
<tr>