c

org.scalatra.scalate

ScalatraRenderContext

class ScalatraRenderContext extends ServletRenderContext

A render context integrated with Scalatra. Exposes a few extra standard bindings to the template.

Linear Supertypes
ServletRenderContext, DefaultRenderContext, RenderContext, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalatraRenderContext
  2. ServletRenderContext
  3. DefaultRenderContext
  4. RenderContext
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScalatraRenderContext(kernel: ServletBase, engine: TemplateEngine, out: PrintWriter, req: HttpServletRequest, res: HttpServletResponse)

Type Members

  1. case class Unescaped extends Product with Serializable
    Definition Classes
    RenderContext

Value Members

  1. def <<(v: Any): Unit
    Definition Classes
    DefaultRenderContext → RenderContext
  2. def <<<(v: Any): Unit
    Definition Classes
    DefaultRenderContext → RenderContext
  3. def attribute[T](name: String): T
    Definition Classes
    RenderContext
  4. def attributeKeys: List[String]
    Definition Classes
    RenderContext
  5. def attributeOrElse[T](name: String, defaultValue: ⇒ T): T
    Definition Classes
    RenderContext
  6. val attributes: AttributeMap
    Definition Classes
    ServletRenderContext → DefaultRenderContext → RenderContext
  7. def capture(template: Template): String
    Definition Classes
    DefaultRenderContext → RenderContext
  8. def capture(body: ⇒ Unit): String
    Definition Classes
    DefaultRenderContext → RenderContext
  9. def captureAttribute(name: String)(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  10. def captureAttributeAppend(name: String)(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  11. def captureNodeSeq(template: Template): NodeSeq
    Definition Classes
    RenderContext
  12. def captureNodeSeq(body: ⇒ Unit): NodeSeq
    Definition Classes
    RenderContext
  13. def collection(objects: Traversable[AnyRef], viewName: String, separator: ⇒ Any): Unit
    Definition Classes
    RenderContext
  14. def contextPath: String
    Definition Classes
    ServletRenderContext
  15. def csrfKey: String
  16. def csrfToken: String
  17. val currentTemplate: String
    Definition Classes
    RenderContext
  18. def currentUriMinus(newQueryArgs: String): String
    Definition Classes
    ServletRenderContext
  19. def currentUriPlus(newQueryArgs: String): String
    Definition Classes
    ServletRenderContext
  20. def dateFormat: DateFormat
    Definition Classes
    RenderContext
  21. def dateFormat_=(value: DateFormat): Unit
    Definition Classes
    RenderContext
  22. val engine: TemplateEngine
    Definition Classes
    DefaultRenderContext → RenderContext
  23. def escape(v: Any): Unit
    Definition Classes
    RenderContext
  24. val escapeMarkup: Boolean
    Definition Classes
    RenderContext
  25. def fileMultiParams: FileMultiParams
  26. def fileParams: Map[String, FileItem]
  27. def filter(name: String, content: String): String
    Definition Classes
    RenderContext
  28. def flash: Map[String, Any]
  29. def flush(): Unit
    Definition Classes
    DefaultRenderContext
  30. def format: String
  31. def format(pattern: String, args: AnyRef*): String
    Definition Classes
    RenderContext
  32. def forward(page: String, escape: Boolean): Unit
    Definition Classes
    ServletRenderContext
  33. def include(path: String, layout: Boolean, extraBindings: Traversable[Binding]): Unit
    Definition Classes
    RenderContext
  34. def include(path: String, layout: Boolean): Unit
    Definition Classes
    RenderContext
  35. def include(path: String): Unit
    Definition Classes
    RenderContext
  36. def inject[T](implicit manifest: ClassTag[T]): T
    Definition Classes
    RenderContext
  37. def introspect(aType: Class[_]): Introspector[_]
    Definition Classes
    RenderContext
  38. def layout(path: String, attrMap: Map[String, Any])(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  39. def load(uri: String): String
    Definition Classes
    RenderContext
  40. def locale: Locale
    Definition Classes
    ServletRenderContext → RenderContext
  41. def multiParams: MultiParams
  42. val noneString: String
    Definition Classes
    RenderContext
  43. val nullString: String
    Definition Classes
    RenderContext
  44. def numberFormat: NumberFormat
    Definition Classes
    RenderContext
  45. def numberFormat_=(value: NumberFormat): Unit
    Definition Classes
    RenderContext
  46. var out: PrintWriter
    Definition Classes
    DefaultRenderContext
  47. def parameter(name: String): String
    Definition Classes
    ServletRenderContext
  48. def parameterValues(name: String): Array[String]
    Definition Classes
    ServletRenderContext
  49. def params: Params
  50. def percent(number: Number): String
    Definition Classes
    RenderContext
  51. def percentFormat: NumberFormat
    Definition Classes
    RenderContext
  52. def percentFormat_=(value: NumberFormat): Unit
    Definition Classes
    RenderContext
  53. def queryString: String
    Definition Classes
    ServletRenderContext
  54. def render(path: String, attributeMap: Map[String, Any]): Unit
    Definition Classes
    RenderContext
  55. val request: HttpServletRequest
    Definition Classes
    ServletRenderContext
  56. def requestFile: Option[File]
    Definition Classes
    DefaultRenderContext → RenderContext
  57. def requestResource: Option[Resource]
    Definition Classes
    DefaultRenderContext → RenderContext
  58. def requestUri: String
    Definition Classes
    ServletRenderContext → DefaultRenderContext → RenderContext
  59. def resource[T]: T
    Definition Classes
    RenderContext
  60. def resourceOrElse[T](defaultValue: T): T
    Definition Classes
    RenderContext
  61. val response: HttpServletResponse
    Definition Classes
    ServletRenderContext
  62. def servlet(page: String, escape: Boolean): Unit
    Definition Classes
    ServletRenderContext
  63. def servletConfig: Config
    Definition Classes
    ServletRenderContext
  64. val servletContext: ServletContext
    Definition Classes
    ServletRenderContext
  65. def session: HttpSession
  66. def sessionOption: Option[HttpSession]
  67. def setAttribute(name: String, value: Option[Any]): Unit
    Definition Classes
    RenderContext
  68. implicit def toStringPair(entry: (Symbol, Any)): (String, Any)
    Definition Classes
    RenderContext
  69. def unescape(v: Any): Unit
    Definition Classes
    RenderContext
  70. def uri(uri: String): String
    Definition Classes
    ServletRenderContext → RenderContext
  71. def uri(file: File): Option[String]
    Definition Classes
    RenderContext
  72. def url(route: Route, params: Map[String, String], splats: Iterable[String]): String

    Calculate a URL for a reversible route, some params, and some splats.

    Calculate a URL for a reversible route, some params, and some splats.

    route

    a reversible route

    params

    a map of param/value pairs

    splats

    a series of splat parameters

    returns

    a URI that matches the route for the given splats

    Exceptions thrown

    Exception if the route is not reversible

    IllegalStateException if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.

  73. def url(route: Route, splat: String, moreSplats: String*): String

    Calculate a URL for a reversible route and some splats.

    Calculate a URL for a reversible route and some splats.

    route

    a reversible route

    splat

    the first splat parameter

    moreSplats

    any splat parameters beyond the first

    returns

    a URI that matches the route for the given splats

    Exceptions thrown

    Exception if the route is not reversible

    IllegalStateException if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.

  74. def url(route: Route, params: (String, String)*): String

    Calculate a URL for a reversible route and some params.

    Calculate a URL for a reversible route and some params.

    route

    a reversible route

    params

    a list of named param/value pairs

    returns

    a URI that matches the route for the given params

    Exceptions thrown

    Exception if the route is not reversible

    IllegalStateException if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.

  75. def value(any: Any, shouldSanitize: Boolean): Any
    Definition Classes
    RenderContext
  76. def valueEscaped(any: Any): Any
    Definition Classes
    RenderContext
  77. def valueUnescaped(any: Any): Any
    Definition Classes
    RenderContext
  78. def view(model: AnyRef, viewName: String): Unit
    Definition Classes
    RenderContext
  79. val viewPostfixes: List[String]
    Definition Classes
    RenderContext
  80. val viewPrefixes: List[String]
    Definition Classes
    RenderContext
  81. def withAttributes[T](attrMap: Map[String, Any])(block: ⇒ T): T
    Definition Classes
    RenderContext
  82. def withUri[T](uri: String)(block: ⇒ T): T
    Definition Classes
    RenderContext
  83. val wrapCssInCData: Boolean
    Definition Classes
    RenderContext
  84. def xsrfKey: String
  85. def xsrfToken: String

Deprecated Value Members

  1. def responseFormat: String
    Annotations
    @deprecated
    Deprecated

    (Since version 2.3) format now means the same as responseFormat, responseFormat will be removed eventually