Reputation: 39909
I want to make various specific input fields and I followed this tutorial.
I'm using Play 2 with Java in Eclipse.
The problem I'm facing is this line :
@implicitField = @{ FieldConstructor(myFieldConstructorTemplate.f) }
@main("Title"){}
), It can't find FieldConstructor.
@implicitField
generate a compilation error : not found: value implicitField.
How can I do?
I'd prefer to define a package since I will have many inputs (text, radio, checkboxes, etc). I like how it has been done here but I have no idea how to make multiple helpers like that that would be automatically used in my templates.
Thank you for your help, I appreciate!
Upvotes: 1
Views: 1018
Reputation: 55798
That's quite common ... mistake :) you need to import helper package first in your template:
@import helper._
@implicitField = @{ FieldConstructor(myFieldConstructorTemplate.f) }
@main("Title"){
....
}
Upvotes: 4