This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.scala-lang</groupId> | |
<artifactId>scala-library</artifactId> | |
<version>${scalaVersion}</version> | |
</dependency> | |
<dependency> | |
<groupId>org.scala-lang</groupId> | |
<artifactId>scala-compiler</artifactId> | |
<version>${scalaVersion}</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.parsing.combinator._ | |
import java.io.Reader | |
abstract class OutputLine { | |
def text: String | |
} | |
case class TextLine(text: String) extends OutputLine {} | |
case class LogLine(level: String, line: OutputLine) extends OutputLine { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyTemplates { | |
@template("foo.ssp") | |
def cheese(arg1: Arg1, arg2: Arg2) : Unit | |
} | |
@templateDir("/foo/bar", ext=".ssp") | |
class MyTemplates { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading page: http://localhost:58592/ssp/renderObject.ssp | |
java.lang.InstantiationException: org.fusesource.scalate.sample.$_scalate_$Person_index_ssp | |
at java.lang.Class.newInstance0(Class.java:340) | |
at java.lang.Class.newInstance(Class.java:308) | |
at org.fusesource.scalate.TemplateEngine.createTemplate(TemplateEngine.scala:175) | |
at org.fusesource.scalate.TemplateEngine.preparePage(TemplateEngine.scala:163) | |
at org.fusesource.scalate.TemplateEngine.load(TemplateEngine.scala:79) | |
at org.fusesource.scalate.servlet.TemplateEngineServlet.service(TemplateEngineServlet.scala:46) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) | |
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value match { | |
case n: Node => out.print(n) | |
case s: Seq[Node] => for (n <- s) {out.print(n)} | |
case a => write(XmlEscape.escape(toString(a))) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* NOTE this file is autogenerated by Scalate : see http://scalate.fusesource.org/ */ | |
package Application | |
object $_scalate_$index_ssp{ | |
def $_scalate_$render($_scalate_$_context:_root_.org.fusesource.scalate.RenderContext): Unit = { | |
val context:org.fusesource.scalate.DefaultRenderContext = ($_scalate_$_context.attributes.get("context") match { | |
case None => { throw new _root_.org.fusesource.scalate.NoValueSetException("context") } | |
case Some(null) => { throw new _root_.org.fusesource.scalate.NoValueSetException("context") } | |
case Some(value) => { value.asInstanceOf[org.fusesource.scalate.DefaultRenderContext] } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class PersonFormModelSupport extends Composite { | |
@UiField | |
FieldModel<Boolean> likesCheese = fieldOfType(Boolean.class).boundTo(someBean, "cheeseLover"); | |
@UiField | |
FieldModel<String> whyILikeCheese = fieldOfType(String.class).boundTo(someBean, "reasonForLi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ val type: Class %> | |
\<%@ val it: ${type.getName%} %> | |
<table> | |
<% for (property <- introspect(type)) { %> | |
<tr> | |
<td>${property.label}</td> | |
<td>\${it.${property.name}}</td> | |
</tr> | |
<%}%> | |
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table class="person"> | |
<tr> | |
<td> | |
<label>last</label> | |
</td> | |
<td class="value"> | |
${it.last} | |
</td> | |
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-@ import val it: Console | |
%h2 Scalate Console | |
%ul | |
%li create view | |
%li templates: #{templates} | |
%li resource: #{resource} | |
- if (templates != null) |
OlderNewer