Play Framework 2 view declaration

randombits

I am looking at a Play Framework 2 view that starts with the following declarations:

@()

@main("Product Form")

I understand the call @main("Product Form") is passing a String object to the main template. What's with the @() call though? Is it required to declare that if the template is not receiving any arguments from its caller?

biesior

In first line you need to declare parameters of the view (which is a Scala function as you know from the doc) however if view doesn't get any params most probably you can remove the @() line without any problem.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Play 2 framework: scala iterate through fields of java objects in view

From Dev

Play framework 2: reverse routing with parameter in view file syntax

From Dev

Custom view directories for Play Framework 2.x not working

From Dev

Formatting ValidationError in View with Play Framework

From Dev

Play Framework using View Tags

From Dev

Scala/Play Framework: Passing a view to a view

From Dev

Objectify with Play Framework 2

From Dev

Play Framework 2: How to access default values for hidden form fields in view templates?

From Dev

How to view the JVM memory usage of the Play framework

From Dev

Play Framework - Render list of Objects - Not Found in the View

From Dev

How to read an array into a view, in the Play framework?

From Dev

Using Controller Methods in View - Play Framework - Scala

From Dev

Configure QueryDSL on Play 2 Framework

From Dev

Use MongoDB with Play 2 Framework

From Dev

Configure QueryDSL on Play 2 Framework

From Dev

Play 2! framework multithreading issue

From Dev

play framework (java) : view include another view with a map

From Dev

View Models in Zend Framework 2

From Dev

Play Framework 2 & AngularJS - Partial Handling

From Dev

Unit Test controllers in Play 2 framework with Scala

From Dev

How to reference to the standard ActorSystem of play framework 2?

From Dev

Redirect with URL fragment with Play framework 2

From Dev

Loading an arbitrary file in the Play Framework 2 (Scala)

From Dev

How to combine play framework and angular2?

From Dev

Facebook auth plugin for play framework 2

From Dev

Logging syntax for Play Framework 2 in Scala

From Dev

JMX with Play 2.XX framework

From Dev

Slick 2: Delete row in slick with play framework

From Dev

Play Framework 2 Language Code in URL Concept?

Related Related

  1. 1

    Play 2 framework: scala iterate through fields of java objects in view

  2. 2

    Play framework 2: reverse routing with parameter in view file syntax

  3. 3

    Custom view directories for Play Framework 2.x not working

  4. 4

    Formatting ValidationError in View with Play Framework

  5. 5

    Play Framework using View Tags

  6. 6

    Scala/Play Framework: Passing a view to a view

  7. 7

    Objectify with Play Framework 2

  8. 8

    Play Framework 2: How to access default values for hidden form fields in view templates?

  9. 9

    How to view the JVM memory usage of the Play framework

  10. 10

    Play Framework - Render list of Objects - Not Found in the View

  11. 11

    How to read an array into a view, in the Play framework?

  12. 12

    Using Controller Methods in View - Play Framework - Scala

  13. 13

    Configure QueryDSL on Play 2 Framework

  14. 14

    Use MongoDB with Play 2 Framework

  15. 15

    Configure QueryDSL on Play 2 Framework

  16. 16

    Play 2! framework multithreading issue

  17. 17

    play framework (java) : view include another view with a map

  18. 18

    View Models in Zend Framework 2

  19. 19

    Play Framework 2 & AngularJS - Partial Handling

  20. 20

    Unit Test controllers in Play 2 framework with Scala

  21. 21

    How to reference to the standard ActorSystem of play framework 2?

  22. 22

    Redirect with URL fragment with Play framework 2

  23. 23

    Loading an arbitrary file in the Play Framework 2 (Scala)

  24. 24

    How to combine play framework and angular2?

  25. 25

    Facebook auth plugin for play framework 2

  26. 26

    Logging syntax for Play Framework 2 in Scala

  27. 27

    JMX with Play 2.XX framework

  28. 28

    Slick 2: Delete row in slick with play framework

  29. 29

    Play Framework 2 Language Code in URL Concept?

HotTag

Archive