我在页面中是这样写的
<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="提交"/>
<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中怎么获取表单中的值?求解啊~~~各位大虾~~~~
<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="提交"/>
<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中怎么获取表单中的值?求解啊~~~各位大虾~~~~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货