bindFormRequest() encounter a cannot find symbol error in Play 2.0.3

I create a form with Play framework. but I get a error: cannot find symbol I reviewed the example codes in play directory, still can not figure it out. by the way, can I use Play to access PostgresSQL in heroku? This is following code:

This is piece of code in /controllers/Application.java

    final static Form<Geo> geoForm = form(Geo.class);

    public static Result showDBpage(){

          //get problem here :-<
          Form<Geo> filledForm = geoForm.bindFormRequest(); 
          Geo loc = filledForm.get();
          return ok(database.render(loc));
        }

This is conf/routes:

POST    /database   controllers.Application.showDBpage()

views/database.scala.html

@(loc: Geo)

@main("") {

    <p>This is Database pages</p>

    <p>@loc.longitute and @loc.latitute</p>

    <a href=@routes.Application.index>Back to form</a>
}

models/Geo.java:

package models;

import java.util.*;
import javax.validation.*;
import play.data.validation.Constraints.*;

public class Geo
  {
    @Required
    public String longitute;
    @Required
    public String latitute;

    public Geo()
    {

    }

    public Geo(String longitude,String latitute)
    {
        this.longitute = longitute;
        this.latitute = latitute;
        //this.length = length;
    }
  }

Answers


There is NO method bindFormRequest() but bindFromRequest() - you have a typo in your code.

Check the API http://www.playframework.org/documentation/api/2.0.2/java/play/data/Form.html


Need Your Help

How do I create a multidimensional array list in c#?

c# arraylist

Is it possible to create a multidimensional arraylist in C#?

JPA, Maps and insertion order

java orm jpa

My google-fu is failing me in this. I'm doing a small database app which reads some data from a file along with some meta data that I currently store in a Map in my entity. I'm getting fed up with it