I wonder if play 2.0.3 and higher supports else if
in views? I only read that one have to code that way: if {...}else{if{...}else{...}}
cannot believe that.
标签:
playframework
相关问题
- PlayFramework: how to transform each element of a
- Could not import the newly generated play framewor
- Play Framework Unicode symbols in HTTP Header
- Putting output of 'git describe' in templa
- org.scala-sbt#sbt;${{sbt.version}}: not found on e
相关文章
- Testing request with CSRF Token in Play framework
- How to map an abstract collection with jpa?
- play2 framework my template is not seen. : package
- How does @Inject in Scala work
- play framework 2.0 - unexpected exception - Key No
- Error integration fingerprint U.are.U SDK with jav
- Custom bridge table in playframework ebean
- how to handle fileupload into a table in play fram
No, it doesn't. It allows you only for
if(condition) {then...} else {otherwise...}
For more possibilities you need to use Pattern Matching (similar to PHP's
switch()
)In this case
_
is a default option.Sample from previous version of Play Autheticate (now the same is done with reflections in the controller)
So maybe best option for you will be resolving the condition in the controller and passing it as a param to the view?