例子:
PRivate String id; private String firstName; private String middleInitial; private String lastName; private String street; private String city; private String state; private String zip; private String phone; private String email;和下面的jsp文件中的 name的值要一样
<tr><td><s:textfield name="id" label="编号"></s:textfield></td></tr> <tr><td><s:textfield name="firstName" label="客户姓"></s:textfield></td></tr> <tr><td><s:textfield maxlenght="1" name="middleInitial" label="中间缩写"></s:textfield></td></tr> <tr><td><s:textfield name="lastName" label="客户名"></s:textfield></td></tr> <tr><td><s:textfield name="street" label="街道"></s:textfield></td></tr> <tr><td><s:textfield name="city" label="城市"></s:textfield></td></tr> <tr><td><s:textfield maxlenght="2" name="state" label="省份简写"></s:textfield></td></tr> <tr><td><s:textfield name="zip" label="区号"></s:textfield></td></tr> <tr><td><s:textfield name="phone" label="电话"></s:textfield></td></tr> <tr><td><s:textfield name="email" label="Email"></s:textfield></td></tr>
新闻热点
疑难解答