0
新玩PlayFramwork和遇到障礙。 @https://www.playframework.com/documentation/2.3.x/JavaForms上的教程通過將表單輸入綁定到類來顯示處理表單。但是,我想處理HTML表單而不將我的字段綁定到類。我的形式Play Framework:處理POST params?
例子:
<form method="POST" action="form/submit">
<input type="file" name="slider[1][file]" class="thumbnailUpload">
<input type="text" value="http://www.tapiture.com/shop/collection1" name="slider[1][url]" class="form-control">
<input type="file" name="slider[2][file]" class="thumbnailUpload">
<input type="text" value="http://www.tapiture.com/shop/collection1" name="slider[3][url]" class="form-control">
<input type="file" name="slider[2][file]" class="thumbnailUpload">
<input type="text" value="http://www.tapiture.com/shop/collection1" name="slider[3][url]" class="form-control">
</form>
我希望能夠在我的行動來處理這個像這樣:
String url = form.get("slider")[0]["url"]
我已經試過
RequestBody body = request().body();
final Map<String, String[]> values = body.asFormUrlEncoded();
而且做這個,我只能訪問像這樣的值
value.get("slider[1][url]")
,但我得到
[Ljava.lang.String;@4d36e231
HELP !!!!!!