Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7519679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:56:35+00:00 2026-05-30T01:56:35+00:00

The examples in playframework seem to be lacking my example. The booking is the

  • 0

The examples in playframework seem to be lacking my example. The booking is the closest but it is an example of CRUD module and uses this parent() call which I am not sure what that does either. Is there an example without the CRUD module?

Also, all the validation sample examples call “render” on the methods for the http POSTs…is that the preferred method instead of redirect to a GET with the errors in the page?

The specific example I am looking for that would answer all these questions would be

  • create new object with editentity.html
  • rerender with errors
  • AND edit old object with editentity.html (same html page as above obviously).

Is there a good example of this?

MORE notes here…
We have this from the calling page(or different calling pages)
For adding a project

<a href="@{Project.editProject(null)">Add Project</a>

For editing a project

<a href="@{Project.editProject(project.name)">Edit</a>

BUT now if I do that, I struggle with the post now as I have

public static void postProject(ProjectDbo project) {

    if(validation.hasErrors()) {
        Validation.keep();
        params.flash();
        Project.editProject(???????/???); //I need to pass in the project to refill in the form AND the project.name for the routes file???
    }

    SomePage.pageXXXXX();
}

NOTE: the ???? is where I need to pass in projectDbo, but the method only accepts the projectName only. How to get the stuff to render back in the page again?

I think there must be a way to call editProject and set that projectDbo needs to be accessed by the page too or is there not a way to do this? How to do this pattern?

TRY #5: I did try using params.flash and calling Project.editProject(project.name) but unfortunately, none of my form is filled back in and the user loses ALL of his work that he filled in. The only thing I have working is using render(action, {params list not matching the action arguments})

(The booking example is lots of ajax so hard to see the example there).

this is such a common use case, I would have thought there would be an example for it.

thanks,
Dean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:56:36+00:00Added an answer on May 30, 2026 at 1:56 am

    I have built exactly that example for a presentation at the Java User Group in Buenos Aires.

    It’s just a basic crud application, featuring validations, one-to-many relationship, fixtures, tests, tags, twitter bootstrap, and deployment to several PaaS cloud computing.

    This is the github repo: https://github.com/opensas/play-demo

    A detailed step by step tutorial: https://github.com/opensas/play-demo/wiki

    The application is up and running on

    Openshift, Google application engine, heroku, Cloudbees

    Is is based on the zencontact example, which is also what you are looking for.

    And about using the same form, this is the code from the app:

    public static void form(Long id) {
        final Event event;
        if (id==null) {
            event = new Event();
        } else {
            event = Event.findById(id);
        }
        render(event);
    }
    
    public static void save(@Valid Event event) {
        if (validation.hasErrors()) {
            render("@form", event);
        }
        event.save();
        flash.success("event successfully saved!");
        list();
    }
    

    I hope it’s useful…

    Saludos

    Sas

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking at this example in the section Assign static args http://www.playframework.org/documentation/1.2.4/routes but
Many examples are about adding days to this day. But how to do it,
Any examples or libraries to caculate HMAC-SHA1 in Erlang? I tried Crypto Module, but
The CRUD module cannot convert the meaningful class name in play framework. For example,
Examples could be Infragistics or DevExpress. But I'm also looking for your opinions on
The examples I've seen online seem much more complex than I expected (manually parsing
Many examples of macros seem to be about hiding lambdas, e.g. with-open-file in CL.
The examples for Cache.Add uses DateTime.Now.Add to compute the expiration, i.e. it passes: DateTime.Now.AddSeconds(60)
Tried examples from 'php.net' but don't understand what's the problem. Any suggestions? <?php $_SESSION['test']
I installed the playframework fbconnect module (version 0.6). I keep getting the following error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.