Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表单对象list属性,不写前缀提交的到入口函数后该字段为空 #1310

Closed
Leewell1989 opened this issue Aug 29, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@Leewell1989
Copy link
Contributor

表单对象中包含list属性,如果不使用前缀,则提交到后台该属性为空:

public class ApplyTaskEntity {
       @Many(field = "applyNo")
	@Comment("清单")
	public List<ApplyInfoEntity> plgs;
}
public class ApplyInfoEntity{
     public String rightNames;
}
public Object save(@Param("..") ApplyTaskEntity task) {
        //TODO 
}
<form method="post" action="" >
     <input name="plgs:0.rightNames" />
</form>

以上这种写法,后台task.plgs为空,

使用前缀表单的方式,入口函数中@param("..")改成@param("::task."),同时表单项的name改为task.plgs:0.rightNames则可以正常接收。

问题详情

@wendal
Copy link
Member

wendal commented Aug 29, 2017

嗯,考虑统一起来

@wendal wendal closed this as completed in 428efb8 Aug 31, 2017
@wendal wendal self-assigned this Aug 31, 2017
@wendal wendal added the Mvc label Aug 31, 2017
@wendal wendal added this to the 1.r.63 milestone Aug 31, 2017
@wendal
Copy link
Member

wendal commented Aug 31, 2017

改成支持下面的写法

@Param("::") ApplyTaskEntity task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants