Click here to Skip to main content
15,885,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on playframework and I have problem with scala forms when i apply the .get() methode to the form to create object i got all the object attributes are null.

here is my code:

import play.data.*;
import static play.data.Form.*;

public static Result save() {
Form<myobj> boundForm = cardForm.bindFromRequest();

    if(boundForm.hasErrors()) {
        flash("error", "Please correct the form below.");
        return badRequest(page1.render(boundForm));

    }
    myobj temp= boundForm.get();
     temp.save();
    .
    .
    .
  }

the problem is all the attributes in "myobj" are null although when i add breakpoint in the intellij-idea and see the values inside the form isee that it has data
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900