1

Is there a predefined concept for converters or something similar in Play 2.0? (Having used JSF in the past, there is javax.faces.convert.Converter for converting specific types to String values and back).

qqilihq
  • 10,794
  • 7
  • 48
  • 89

1 Answers1

1

Talking about Play 2.x, as the templates use Scala, in theory you could use Scala implicits to do automatic conversions between required types.

Be aware that it may cause some problems, better use it sparingly and only if completely necessary, but if it is justified...

Pere Villega
  • 16,429
  • 5
  • 63
  • 100
  • Thank you Pere, could you give me a small snippet example? I'm not yet into Scala at all, currently. – qqilihq Jun 17 '13 at 13:08
  • 1
    @qqilihq this question http://stackoverflow.com/questions/10375633/understanding-implicit-in-scala has information that will help you – Pere Villega Jun 17 '13 at 13:24