Announcement Announcement Module
Collapse
No announcement yet.
spring2.5.3 formbean error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring2.5.3 formbean error

    i use the tarticletype as form bean

    Code:
    public class Tarticletype implements Serializable {
        private static final long serialVersionUID = 1L;
    
        private int typeid;
    
        private String typename;
    
        private Boolean isUsed;
    .....
    Code:
    <form name="typefrm" method="post"
        action="<c:url value="/manager/arttypemanager.do?method=save"/>">
    <table width="600" border="1">
        <caption>类别信息编辑</caption>
        <tr>
            <td width="150" align="right">类别编号</td>
            <td width="150" align="left"><spring:bind path="arttype.typeid">
                <input name="${status.expression }" value="${status.value }"
                    type="text" size="15">
            </spring:bind></td>
    ......
    Code:
    @RequestMapping(method=RequestMethod.POST,params="method=save")
        public String saveArtType(Tarticletype arttype,ModelMap model){
            System.out.println(arttype.getTypeid());
    ....
    after submit, i get the value of "typeid" is always "0" in spite of what input .but i can get the right value when i change the "typeid" type to Ingeger.
    who can tell me why it is.

    my springframework is 2.5.3.
Working...
X