play.mvc.Http.Request.flash()

Here are the examples of the java api play.mvc.Http.Request.flash() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

15 Source : QuestionController.java
with Apache License 2.0
from seattle-uat

@Secure(authorizers = Authorizers.Labels.UAT_ADMIN)
public CompletionStage<Result> index(Request request) {
    Optional<String> maybeFlash = request.flash().get("message");
    return service.getReadOnlyQuestionService().thenApplyAsync(readOnlyService -> {
        return ok(listView.render(readOnlyService.getAllQuestions(), maybeFlash));
    }, httpExecutionContext.current());
}

13 Source : DatabaseSeedController.java
with Apache License 2.0
from seattle-uat

/**
 * Display state of the database in roughly formatted string. Displays a button to generate mock
 * database content and another to clear the database.
 */
public Result index(Request request) {
    if (environment.isDev()) {
        ImmutableList<ProgramDefinition> programDefinitions = programService.listProgramDefinitions();
        ImmutableList<QuestionDefinition> questionDefinitions = questionService.getReadOnlyQuestionService().toCompletableFuture().join().getAllQuestions();
        return ok(view.render(request, programDefinitions, questionDefinitions, request.flash().get("success")));
    } else {
        return notFound();
    }
}

13 Source : ApplicantProgramsController.java
with Apache License 2.0
from seattle-uat

public CompletionStage<Result> index(Request request, long applicantId) {
    Optional<String> banner = request.flash().get("banner");
    return programService.listProgramDefinitionsAsync().thenApplyAsync(programs -> {
        return ok(programIndexView.render(messagesApi.preferred(request), applicantId, programs, banner));
    }, httpContext.current());
}