Questions tagged [scalate]

Scalate is a Scala based template engine for generating text and markup using the following template formats: Mustache, Scaml, Jade, and SSP.

Scalate is a Scala 2.8 based template engine for generating text and markup which can be used in the following frameworks and environments:

Scalate supports the following template formats

  • Mustache which is a Scala dialect of Mustache for logic-less templates which also work inside the browser using mustache.js
  • Scaml which is a Scala dialect of Haml and is very DRY for generating HTML / XHTML
  • Jade which is an even more DRY dialect of Scaml for HTML / XHTML markup generation
  • SSP which is like Velocity, JSP or Erb from Rails

Scalate also has a powerful web console and command line shell which includes converters from JSP or HTML to Scalate

Still confused? Check out which template engine is right for me, why Scalate or how Scalate compares to JSP or Lift

72 questions
0
votes
1 answer

Embedding Json in Scalate

I want to embed JSON in the DOM as outlined in the below question: Best practice for embedding arbitrary JSON in the DOM? However I can't figure out how to do this with Scalate/Scalatra. I have this in my scaml template: -@ val fullStateJson:…
scalapeno
  • 833
  • 1
  • 6
  • 13
0
votes
1 answer

Error installing scalate on osx

Got below error when installing scalate on OSX Yosemite by following http://scalate.github.io/scalate/documentation/installing.html brew install scalate Error: No available formula for scalate Searching formulae... Searching taps... Any idea?
jiangok
  • 2,622
  • 3
  • 21
  • 26
0
votes
1 answer

how to get Table sent by scalate ssp in a javascript function

I work with framework scalatra , I declare my array in this manner up the page .ssp <% @ val table_activity: Array [String]%> usually if I want to extract data from middle of the page .ssp : <% for ( x <- 0 to table_activity.length-1) { %> …
yotta
  • 35
  • 4
0
votes
2 answers

Why does Scalatra give me a FlashMap casting error sometimes?

When running Scalatra in code reload mode, if I load the page before the scalate engine has reinitialized I get a 500 error. If I watch the terminal until it looks like the engine has fully reloaded, it works fine, but I think this happens when I…
Matthew Rathbone
  • 8,144
  • 7
  • 49
  • 79
0
votes
1 answer

Gradle application plugin and Scala

I have a gradle project that has a scala subproject, say scalamodule. I want to be able to run the scala subproject as an application (this is part of the build/release process but it's irrelevant right now). Now if I use the Gradle application…
Giovanni Botta
  • 9,626
  • 5
  • 51
  • 94
0
votes
2 answers

how to make the connection between sclate,the servlet and classes

I'm new with the architecture of scalatra and devloppement scala .. i want to do a project with these new technilogies with templates but the problem that I can not understand how to realize the connection between the class or object, the servlet…
yotta
  • 35
  • 4
0
votes
2 answers

Cannot import scalate, after downloading with SBT

my build.sbt has libraryDependencies += "org.fusesource.scalate" % "scalate-core" % "1.6.1" from "http://repo.fusesource.com/nexus/content/repositories/public/org/fusesource/scalate/" resolvers += "FuseSource Public Repository" at…
sam boosalis
  • 1,997
  • 4
  • 20
  • 32
0
votes
2 answers

Scalate HTML minification via ScamlOptions.indent and ScamlOptions.nl

In Scalate manual for Scaml and Jade it's stated that there two options ScamlOptions.nl and ScamlOptions.indent that can be used to minify outputted HTML. What is also stated is "You will need to configure these before any of your scaml templates…
vania-pooh
  • 2,933
  • 4
  • 24
  • 42
0
votes
1 answer

scalate scalatra NoValueSetException with jade

I'm using Scalatra with Scalate and Jade. When ever I try to apply a template that takes values the values are not being applied to the template and I'm getting a NoValueSetException... Here is the code I have: // --------- In PostsServlet…
tantalum
  • 2,354
  • 1
  • 15
  • 22
0
votes
1 answer

Accessing flash map from Jade template in Scalatra

I'm creating application using Scalatra and I'm using Scalate/Jade for templating. I try to add flash support to my application. I mixed FlashMapSupport into into my Servlet and I'm able to access flash helper. Anyway, if I'm trying to get it from…
Yura Taras
  • 1,293
  • 14
  • 26
0
votes
1 answer

maven cannot create archetype org.fusesource.scalate.tooling:scalate-archetype-jersey

Using a clean installation of maven 3.0.1: > mvn archetype:generate Choose a number or apply filter: 461: remote -> org.fusesource.scalate.tooling:scalate-archetype-jersey (An archetype which creates an empty Scalate web application) Choose…
David Portabella
  • 12,390
  • 27
  • 101
  • 182
0
votes
1 answer

Scalate Jade multiple includes doesn't work as expected

Partial 1, widget1.jade: p 1 Partial 2, widget2.jade: p 2 Layout attempt 1: - include("widget1.jade") This renders:

1

Layout attempt 2: - include("widget2.jade") This renders:

2

Layout attempt 3: - include("widget1.jade") -…
user375566
1 2 3 4
5