Struts2实现input数据回显

    /** 修改页面 */
    public String editUI() {
        //准备回显得数据
        Role role = roleService.getById(id);
        
        ActionContext.getContext().getValueStack().push(role);

 

//下面的方法也能实现数据回显

//        this.name = role.getName();
//        this.description = role.getDescription();
        
        return "editUI";
    }

 

posted @ 2014-09-04 20:26  siashan  阅读(593)  评论(0编辑  收藏  举报