The Play Framework offers the following quick overview, but with the exception of the Groovy template engine (which you can get in Spring MVC if you want), Spring seems to offer all the same features and more...
Fix the bug and hit reload! Edit your Java files, save, refresh your browser and see the results immediately! No need to comp...
I have a small site I built using the Play framework that I'm trying to run on an EC2 server against an Amazon RDS instance. I can run the app on my machine against the RDS instance and everything works fine. But when I deploy it to my EC2 server it gets this error:
The last packet successfully received from the server was 1,282,977,73...
Say I have these two models:
public class City extends Model
{
@ManyToOne
private Country country;
}
public class Country extends Model
{
}
I have a City object and want to know the related Country's ID. I could fetch from the database by doing city.getCountry().getId() but that seems very wasteful. How can I just get the ID ...
How I can store an instance object foreach user session?
I have a class to modeling a complex algorithm. This algorithm is designed to run step-by-step. I need to instantiate objects of this class for each user. Each user should be able to advance step by step their instance.
...
I'm stuck on whether I should focus on Play or Lift for doing web development in Scala.
Play looks very polished. The Scala-specific tutorial looks amazing. Furthermore, since I've been coding in MVC frameworks for a long time, it looks super familiar. However, it doesn't look like it can easily accomplish all the brilliant things th...
I try to write checks for the play-framework and see two different possibilities. I described both and want to know if my understanding is correct (So it's more a tutorial than a question, specially because I didn't get any response that I missed something).
So what possibilities exists.
The simple way: Extending the class Check:
Advan...
Hi,
I'm new to both hibernate and java, I'm trying to define a simple user->groups->permissions model in playframework, I want the on delete cascade rule enforced at database level and I don't want the orm care about cascade (something similar to python-sqlalchemy passive deletes), here are my models:
User model:
@Entity
@Table(name="...
I'm new to Play Framework, and having trouble rendering a JSON object.
public static void LoginFail() {
Object[][] statusArray = {
{"Status", "401"},
{"Message", "Unauthorized"},
{"Detail", "No API Key Supplied"}
};
renderJSON(statusArray);
}
This only displays "[[{},{}],[{},{}],[{},{}]]"...what am I doing...
I need to create PDFs with Play Framework and Google App Engine. Does anyone know how?
...
I am trying to build query in Play framework, I have
select * from Candidate c where (:schools member of c.schools)
After I bind :school with List with one element it returns result, but if I bind List with multiple elements nothing happens.
Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: {vector} [select...
I'm using playframework to build a web site. And I also use a rich editor named xheditor.
Xheditor support ajax-fileuploading, it needs the server side has a action which accepts "filedata" parameter which contains the upload file.
So I wrote a upload action:
public class Application extends Controller {
public static void upload(...
In play you always follow the Redirect-After-Post-Pattern if you call from a public-method of a controller. This is in most cases a good behavior, but sometime it could be nasty.
So I tried to find out how it works in play 1.1!:
The basic is some byte-code-enhancement, which is done in play.classloading.enhancers.ControllersEnhancer.
Th...
Today I started to play around with git to create some patches. I choose egit for this job, because I don't know a nice gui for git and I'm a eclipse user. I created a branch and I changed the following files (result of git status)
modified: .gitignore
modified: framework/src/play/utils/Java.java
modified: modules/crud/ap...
What are the advantages and disadvantages of frameworks Lift, Play and Wicket? What characteristics are best or only supported by each?
Thanks
...
Suppose I have a Post entity and a Comment entity and a one to many relationship:
@Entity class Post {
...
@OneToMany
List<Comment> comments;
...
}
How can I achieve paging like this:
Post post = //Find the post.
return post.getComments().fetch(100, 10); // Find the 11th page (page size 10);
Is it possible to emulat...
What documentation (books or online resources) you would recommend for a JPA newbie, which want to program with the play framework?
In play you only use annotations and hibernate as JPA implementation, so it would be useful if there would be the focus on.
I started with wiki-book, but not sure if it is the best solution.
A book for gr...
I've settled on the Play framework for the rewrite of our intranet portal. Our portal contains a lot of loosely related stuff so I'm looking for advice on if or how to break it into multiple Play applications.
What are the consequences of making it multiple applications? Is single sign-on still possible? How is access control affecte...
Trying to create an object from an HQL query, but just can't figure out what i'm doing wrong.
Query:
String query = "SELECT product.code, SUM(product.price), COUNT(product.code)
from Product AS product
GROUP BY product.code"
(or should I use new MyCustomList(product.code, SUM(... , even though it's not mapped?)
Now I want to cast thi...
I built a Play app and tried to deploy on weblogic using the following commands:
play war -o myApp myApp
Later I just deployed the exploded war directory to weblogic, everything worked fine but everytime I try to access a route. I get the following error:
Not found
GET /myApp/params
This is a rest service not an application with U...
In the Play getting started docs, they show this controller:
public static void index() {
Post frontPost = Post.find("order by postedAt desc").first();
List<Post> olderPosts = Post.find("order by postedAt desc").from(1).fetch(10);
render(frontPost, olderPosts);
}
Then, in the template the frontPost and olderPosts are used withou...