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. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <<(v: Any): Unit
    Definition Classes
    DefaultRenderContext → RenderContext
  4. def <<<(v: Any): Unit
    Definition Classes
    DefaultRenderContext → RenderContext
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def attribute[T](name: String): T
    Definition Classes
    RenderContext
  8. def attributeKeys: List[String]
    Definition Classes
    RenderContext
  9. def attributeOrElse[T](name: String, defaultValue: ⇒ T): T
    Definition Classes
    RenderContext
  10. val attributes: AttributeMap
    Definition Classes
    ServletRenderContext → DefaultRenderContext → RenderContext
  11. def blankString: String
    Attributes
    protected
    Definition Classes
    RenderContext
  12. def capture(template: Template): String
    Definition Classes
    DefaultRenderContext → RenderContext
  13. def capture(body: ⇒ Unit): String
    Definition Classes
    DefaultRenderContext → RenderContext
  14. def captureAttribute(name: String)(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  15. def captureAttributeAppend(name: String)(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  16. def captureNodeSeq(template: Template): NodeSeq
    Definition Classes
    RenderContext
  17. def captureNodeSeq(body: ⇒ Unit): NodeSeq
    Definition Classes
    RenderContext
  18. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. def collection(objects: Traversable[AnyRef], viewName: String, separator: ⇒ Any): Unit
    Definition Classes
    RenderContext
  20. def contextPath: String
    Definition Classes
    ServletRenderContext
  21. def csrfKey: String
  22. def csrfToken: String
  23. val currentTemplate: String
    Definition Classes
    RenderContext
  24. def currentUriMinus(newQueryArgs: String): String
    Definition Classes
    ServletRenderContext
  25. def currentUriPlus(newQueryArgs: String): String
    Definition Classes
    ServletRenderContext
  26. def dateFormat: DateFormat
    Definition Classes
    RenderContext
  27. def dateFormat_=(value: DateFormat): Unit
    Definition Classes
    RenderContext
  28. val engine: TemplateEngine
    Definition Classes
    DefaultRenderContext → RenderContext
  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  31. def escape(v: Any): Unit
    Definition Classes
    RenderContext
  32. val escapeMarkup: Boolean
    Definition Classes
    RenderContext
  33. def fileMultiParams: FileMultiParams
  34. def fileParams: Map[String, FileItem]
  35. def filter(name: String, content: String): String
    Definition Classes
    RenderContext
  36. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def flash: Map[String, Any]
  38. def flush(): Unit
    Definition Classes
    DefaultRenderContext
  39. def format: String
  40. def format(pattern: String, args: AnyRef*): String
    Definition Classes
    RenderContext
  41. def forward(page: String, escape: Boolean): Unit
    Definition Classes
    ServletRenderContext
  42. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  44. def include(path: String, layout: Boolean, extraBindings: Traversable[Binding]): Unit
    Definition Classes
    RenderContext
  45. def include(path: String, layout: Boolean): Unit
    Definition Classes
    RenderContext
  46. def include(path: String): Unit
    Definition Classes
    RenderContext
  47. def inject[T](implicit manifest: ClassTag[T]): T
    Definition Classes
    RenderContext
  48. def introspect(aType: Class[_]): Introspector[_]
    Definition Classes
    RenderContext
  49. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  50. val kernel: ServletBase
    Attributes
    protected
  51. def layout(path: String, attrMap: Map[String, Any])(body: ⇒ Unit): Unit
    Definition Classes
    RenderContext
  52. def load(uri: String): String
    Definition Classes
    RenderContext
  53. def locale: Locale
    Definition Classes
    ServletRenderContext → RenderContext
  54. def multiParams: MultiParams
  55. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  56. val noneString: String
    Definition Classes
    RenderContext
  57. final def notify(): Unit
    Definition Classes
    AnyRef
  58. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  59. val nullString: String
    Definition Classes
    RenderContext
  60. def numberFormat: NumberFormat
    Definition Classes
    RenderContext
  61. def numberFormat_=(value: NumberFormat): Unit
    Definition Classes
    RenderContext
  62. var out: PrintWriter
    Definition Classes
    DefaultRenderContext
  63. def parameter(name: String): String
    Definition Classes
    ServletRenderContext
  64. def parameterValues(name: String): Array[String]
    Definition Classes
    ServletRenderContext
  65. def params: Params
  66. def percent(number: Number): String
    Definition Classes
    RenderContext
  67. def percentFormat: NumberFormat
    Definition Classes
    RenderContext
  68. def percentFormat_=(value: NumberFormat): Unit
    Definition Classes
    RenderContext
  69. def queryString: String
    Definition Classes
    ServletRenderContext
  70. def removeOldAttributes: Boolean
    Attributes
    protected
    Definition Classes
    RenderContext
  71. def render(path: String, attributeMap: Map[String, Any]): Unit
    Definition Classes
    RenderContext
  72. val request: HttpServletRequest
    Definition Classes
    ServletRenderContext
  73. def requestDispatcher(page: String): RequestDispatcher
    Attributes
    protected
    Definition Classes
    ServletRenderContext
  74. def requestFile: Option[File]
    Definition Classes
    DefaultRenderContext → RenderContext
  75. def requestResource: Option[Resource]
    Definition Classes
    DefaultRenderContext → RenderContext
  76. def requestUri: String
    Definition Classes
    ServletRenderContext → DefaultRenderContext → RenderContext
  77. def resolveUri(path: String): String
    Attributes
    protected
    Definition Classes
    RenderContext
  78. def resource[T]: T
    Definition Classes
    RenderContext
  79. def resourceOrElse[T](defaultValue: T): T
    Definition Classes
    RenderContext
  80. val response: HttpServletResponse
    Definition Classes
    ServletRenderContext
  81. def servlet(page: String, escape: Boolean): Unit
    Definition Classes
    ServletRenderContext
  82. def servletConfig: Config
    Definition Classes
    ServletRenderContext
  83. val servletContext: ServletContext
    Definition Classes
    ServletRenderContext
  84. def session: HttpSession
  85. def sessionOption: Option[HttpSession]
  86. def setAttribute(name: String, value: Option[Any]): Unit
    Definition Classes
    RenderContext
  87. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  88. def toString(): String
    Definition Classes
    AnyRef → Any
  89. implicit def toStringPair(entry: (Symbol, Any)): (String, Any)
    Definition Classes
    RenderContext
  90. def unescape(v: Any): Unit
    Definition Classes
    RenderContext
  91. def uri(uri: String): String
    Definition Classes
    ServletRenderContext → RenderContext
  92. def uri(file: File): Option[String]
    Definition Classes
    RenderContext
  93. 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.

  94. 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.

  95. 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.

  96. def using[T](model: AnyRef)(op: ⇒ T): T
    Attributes
    protected
    Definition Classes
    RenderContext
  97. def value(any: Any, shouldSanitize: Boolean): Any
    Definition Classes
    RenderContext
  98. def valueEscaped(any: Any): Any
    Definition Classes
    RenderContext
  99. def valueUnescaped(any: Any): Any
    Definition Classes
    RenderContext
  100. def view(model: AnyRef, viewName: String): Unit
    Definition Classes
    RenderContext
  101. val viewPostfixes: List[String]
    Definition Classes
    RenderContext
  102. val viewPrefixes: List[String]
    Definition Classes
    RenderContext
  103. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  104. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  105. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  106. def withAttributes[T](attrMap: Map[String, Any])(block: ⇒ T): T
    Definition Classes
    RenderContext
  107. def withUri[T](uri: String)(block: ⇒ T): T
    Definition Classes
    RenderContext
  108. val wrapCssInCData: Boolean
    Definition Classes
    RenderContext
  109. def wrappedRequest: WrappedRequest
    Attributes
    protected
    Definition Classes
    ServletRenderContext
  110. def wrappedResponse: WrappedResponse
    Attributes
    protected
    Definition Classes
    ServletRenderContext
  111. def xsrfKey: String
  112. 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

Inherited from ServletRenderContext

Inherited from DefaultRenderContext

Inherited from RenderContext

Inherited from AnyRef

Inherited from Any

Ungrouped