Questions tagged [playframework]

Play Framework is a modern open-source web framework for Java and Scala.

Play Framework is a modern open-source web framework for Java and Scala. Play provides a clean alternative to legacy Java stacks. Play is based on a lightweight, stateless, web-friendly architecture. Play has two versions: Play 1.x and Play 2.x.

Other related tags

Play Resources

Play 1.x Resources

Play 2.x Resources

17050 questions
5
votes
2 answers

Play 2.2.1: ambiguous implicit values for object PlayMagicForJava

I run Play Framework 2.2.1. I used to have only java controllers rendering templates. Now I am adding a Scala controller to render a new template indexScala.scala.html. The parameters list for indexScala.scala.html: @()(implicit request:…
coolsuntraveler
  • 317
  • 5
  • 11
5
votes
2 answers

SBT plugin dependency resolution fails with com.typesafe.play#sbt-plugin;2.2.1: not found

I've a Play app and when I ran sbt, I got an error as follows: [warn] http://repo.typesafe.com/typesafe/releases/com/typesafe/play/sbt-plugin/2.2.1/sbt-plugin-2.2.1.pom [info] Resolving org.fusesource.jansi#jansi;1.4 ... [warn] …
Qiang Li
  • 9,711
  • 15
  • 72
  • 134
5
votes
3 answers

unresolved sedis dependency with play-plugin for redis

I am using play framework v2.2.1 and have the following in my build.sbt file. resolvers: Resolver.url("play-redis",…
ali haider
  • 15,956
  • 11
  • 68
  • 131
5
votes
1 answer

Using System.getenv to set ProjectRef in build.sbt in Play?

I'm using an OTHER_HOME environment variable to point to a different SBT project directory. I'm going to put the external directory in maven repository or via a github.com#tag project reference, but for now I'd like to add a file-based dependency to…
Jaap
  • 2,802
  • 2
  • 26
  • 48
5
votes
1 answer

Play2 add new field to JsObject

Is it possible to add new field to JsObject? val jsonObj = Json.obj() jsonObj.put("field" -> 100) <==== Somthing like this I have a lot of methods that add new fields. How can I dynamically create JsObject?
Michał Jurczuk
  • 3,468
  • 4
  • 28
  • 53
5
votes
1 answer

object.type does not take parameter error

Following is the code snippet I am using from play with scala book. It works well in the framework but when I try in the commndline it gives the error error: Product.type does not take parameters var products = Set(Product(5018206244611L,…
user2012953
5
votes
3 answers

Play Framework 2.2.1 - Compilation error: "method render in class index cannot be applied to given types;"

I am new to Play Framework, and attempting to build a Todo-list from this manual. When I try to run the application I get the error: Compilation Error error: method render in class index cannot be applied to given types; My code is (the…
Avi Turner
  • 9,342
  • 7
  • 43
  • 68
5
votes
1 answer

PATCH Request using the play framework (java)

I have been looking for a good way to implement a PATCH request using the Play Framework (2.2 Java) but have not been able to find a good way to accomplish this. Using a PUT request works great since validations can be ran through a form builder…
Jason Truluck
  • 1,469
  • 10
  • 17
5
votes
2 answers

How do I change template engine in Play Framework?

How would I change the template engine in Play! to a different engine than the default one? Can you give an example?
trusktr
  • 34,715
  • 41
  • 148
  • 226
5
votes
3 answers

IntelliJ not resolving Play's build.sbt libraryDependencies

I am new to IntelliJ IDE and I am trying to use it for a new Play project I am working on. I have added some libraries to the libraryDependencies in build.sbt but IntelliJ cannot seem to resolve them as External Libraries libraryDependencies ++=…
Wextux
  • 752
  • 9
  • 17
5
votes
1 answer

How to flatten a js array on Play using JSON transformers?

I have a Json of the following format: { "user": { "id": "1", "name": "Some User", "permGroups": [ { "id": "group1", "name": "Group 1", "actions": [ { "id":…
Johnny Everson
  • 7,523
  • 6
  • 35
  • 71
5
votes
1 answer

Play Framework - How to maintain configuration files for different environments?

For my Play 2.2/Scala application (built with SBT), I would like to deploy different configuration files depending on the environment I'm deploying to (e.g. to couple a deployment with a particular database server). How does one create different…
aknuds1
  • 57,609
  • 57
  • 177
  • 299
5
votes
1 answer

How do you override Play framework controller in a unit testing context?

I am creating a basic POST JSON api endoint. I would like to unit test it, and want to make sure I am doing it appropriately in the Play framework. So far I am using Guice for dependency injection and JUnit for my unit testing library. Here is my…
5
votes
1 answer

Play Framework - JSON Serialization Cyclic References (e.g. Files->User, User->Files) --> Stackoverflow

I've been playing around with the play framework for a couple of days now but came across one issue I can't solve: Suppose you have some "User" and "File" classes. Both reference each other and are persisted in the database with ebean (@ManyToOne,…
pasql
  • 3,705
  • 5
  • 19
  • 32
5
votes
1 answer

form binding: relationship with intermediate entity (nested entity) - indirect Entity creation and binding

My simplified model looks like this: @Entity public class Aspect extends Model { @Id public Long id; @OneToMany(cascade = CascadeType.ALL) public List restrictions; } @Entity public class Restriction extends Model { @Id…
Leo
  • 2,020
  • 18
  • 32
1 2 3
99
100