Here are the examples of the java api play.data.DynamicForm.get() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : AbstractJudgelsAPIController.java
with GNU General Public License v2.0
from ia-toki
with GNU General Public License v2.0
from ia-toki
protected Result okAsJson(Http.Request req, Object responseBody) {
String finalResponseBody;
try {
finalResponseBody = mapper.writeValuereplacedtring(responseBody);
} catch (IOException e) {
return internalServerError(e.getMessage());
}
DynamicForm dForm = formFactory.form().bindFromRequest(req);
String callback = dForm.get("callback");
if (callback != null) {
return ok(callback + "(" + finalResponseBody + ");").as("application/javascript");
} else {
return ok(finalResponseBody).as("application/json");
}
}