I'm still learning Play!Framework and, as a lesson, I decided to include a new feature in a application (available in Samples, called "Computer Database").
Well this app is very simple. It has a Computer model and it has a @ManyToOne
relationship with a Company model. Well, basically I decided to copy Computer model and I made a Employee model, which is basically the same. I copied Computer Model, Controller and Routes and I tried to compile unsuccessfully, as you can see below:
public static Result list(int page, String sortBy, String order, String filter) {
return ok(
list.render( //-- LINE IN RED!
Employee.page(page, 10, sortBy, order, filter),
sortBy, order, filter
)
);
}
Actually, I tried to compile it because I was looking for more tips, as I have other issues in my Eclipse, only in my new Controller, called "Employees". The code above is marked with:
Multiple markers at this line: Occurrence of 'render'; The method render(Page<Computer>, String, String, String) in the type list is not applicable for the arguments (Page<Employee>, String, String, String)
And only in this controller I have static methods Result update/create/save/delete pointed with a message:
The method render(Form < Computer >) in the type createForm is not applicable for the arguments (Form < Employee >)
The point is: I'm not trying to use this method with Employee obj arguments. Every single method contains: Form< Employee > employeeForm = form(Employee.class)...
My IDE is saying this method render is not applicable for the Employee Page's arguments, only for Computer Page's, which sounds totally weird for me, because, as I said, it is a generic class, a play-framework native class, and Employee and Computer are models created by me.
--
Employee.page's signature:
public static Page< Employee > page(int page, int pageSize, String sortBy, String order, String filter)
--
I searched a dependency/library inconsistency, but personally I could find it. I've already tried to restart Eclipse, my server, "play clean"/"update"/etc in the console... What else could I verify?