开发者

Play! Framework save list of rows from form

开发者 https://www.devze.com 2023-03-28 00:08 出处:网络
I display a list of db table rows which ar开发者_StackOverflow社区e editable.I would like to allow users to edit the data in the displayed table and save all updates at the same time.How should I get

I display a list of db table rows which ar开发者_StackOverflow社区e editable. I would like to allow users to edit the data in the displayed table and save all updates at the same time. How should I get back the list of updates to the controller?


As Play can bind to POJO's and also bind to Lists, it should be possible to simply create a list of POJOs.

See here for more details http://www.playframework.org/documentation/1.2.2/controllers#array.

It does not give this as an explicit example, but it should work.

If it does not, then the other options you have is to create your own custom binder (also described on the page linked to above).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号