首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

spring mvc后台获取页面级联主键解决思路

2012-04-21 
spring mvc后台获取页面级联主键我在页面中是这样写的form:form idtranType modelAttributeviewCoun

spring mvc后台获取页面级联主键
我在页面中是这样写的 
<form:form id="tranType" modelAttribute="viewCountsDay" action="${ctx}/account/viewCountsDay/card" method="post"> 
<fieldset class="prepend-top"> 
<div> 
<label class="field">交易类型查询:</label> 
<input type="text" id="tranType" name="viewCountsDay_countsPKID_tranType" size="20" /> 
<label class="field">商户号查询:</label> 
<input type="text" id="merchantID" name="viewCountsDay_countsPKID_merchantID" size="20" /> 
<input id="submit" class="button" type="submit" value="提交"/>&nbsp; 
<input id="cancel" class="button" type="reset" value="重置" /> 
</div> 
</fieldset> 
</form:form> 

其中countsPKID是复合主键~~~ 
在viewCountsDay中他是属性~~~ 
countsPKID类 
private String merchantID; 
private String tranType; 
private String yearMonth; 
//set,get方法 

viewCountsDay类 
private int counts; 
private int sums; 

CountsPKID countsPKID = new CountsPKID(); 
  //set,get方法 

请问我在controller中怎么获取表单中的值?求解啊~~~各位大虾~~~~

[解决办法]
报什么错?

热点排行