Questions tagged [scala-template]
71 questions
0
votes
2 answers
play 2.x organize templtes folder structures
How to organize folder structures in app/views folder without conflicting with other application folders? For example,
app/
controllers/
org/
OrgInfo.scala
views/
org/
a.scala.html
…

angelokh
- 9,426
- 9
- 69
- 139
0
votes
2 answers
Play 2.x: How to use two jsRoutes files in one scala template
I'm using jsRoutes in my Play 2.1.x app. Part of my routes file looks the following way:
GET /assets/template/js/routes/admin.js controllers.Admin.jsRoutes
GET /assets/template/js/routes/salonManagement.js…

Artem Panchoyan
- 25
- 6
0
votes
1 answer
Scala template form values are reset
Using Play 2.1 Java version
I have a simple form
@inputText(userForm("usercode"), args = 'placeholder -> "User Code",'class -> "form-control input-sm",'_label -> "User Code")

Suave Nti
- 3,721
- 11
- 54
- 78
0
votes
1 answer
Generate html from pure scala block
How can I generate html from my pure scala block in play framework view?
The following code will put the text of the tags directly in the page and since instead of '<' scala puts '<' the tags are not rendered as html but as pure text!
Is putting…

p00ya00
- 796
- 1
- 10
- 20
0
votes
1 answer
How to render a template from controller within template -- Java, Play 2.1
Is it possible to call a controller method to render a template within a template?
Or is that totally the wrong aproach?
In the div container there is only a sting displayed but not the redered html from my productTable template.
The displayed…

Jan P
- 45
- 10
0
votes
1 answer
Form[] default value in scala template
I try to define defaul value for scala template parameter, like:
@(user: Form[User] = Form[User])
And I see compilation error:
object play.data.Form is not a value
whats wrong?

zolt
- 103
- 4
0
votes
1 answer
Playframework scala template variable definition
I have a accordion group in my play scala template, the first accordions body needs be in class "in collapse" (eg : class="accordion-body in collapse" ) and other accordions need to have class="accordion-body in collapse".
How do I define variables…

Santhosh S
- 1,141
- 6
- 21
- 43
0
votes
1 answer
Play framework 2.0 template issues
@(myForm: Form[FormObject])
@import helper._
@import helper.twitterBootstrap._
@main("Test") {
@form(routes.Application.save) {
@input(myForm("number"), '_label -> "Number") { (id, name, value, args) =>
@if(value.isEmpty) {
…

Art Vandelay
- 55
- 1
- 9
0
votes
1 answer
PlayFramework2 Passing List to main.scala
Am using Play2.1 for one of my projects.
Am trying to create a dynamic menu in the main.scala.html so that it is extendible in all sub-pages.
but how should I pass a List to main.scala.html ..
I tried on a subpage like this
@(menu:…

Suave Nti
- 3,721
- 11
- 54
- 78
0
votes
2 answers
Scala Template unable to tokenise an HTML attribute?
I'd like a Scala condition inside the "class" HTML attribute to be parsed, but the Scala Template isn't playing ball:
@priceTag(amount: Currency) = @{
{if(amount.toDouble >…

Chris Beach
- 4,302
- 2
- 31
- 50
-1
votes
2 answers
Is it possible to avoid .scala.html suffix in playframework?
I hate long filename, and scala here make no sense to me(I don't use scala at all). So is there any way to remove .scala suffix ?

WoooHaaaa
- 19,732
- 32
- 90
- 138