class ScalatraRenderContext extends ServletRenderContext
A render context integrated with Scalatra. Exposes a few extra standard bindings to the template.
- Alphabetic
- By Inheritance
- ScalatraRenderContext
- ServletRenderContext
- DefaultRenderContext
- RenderContext
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ScalatraRenderContext(kernel: ServletBase, engine: TemplateEngine, out: PrintWriter, req: HttpServletRequest, res: HttpServletResponse)
Type Members
-
case class
Unescaped extends Product with Serializable
- Definition Classes
- RenderContext
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
<<(v: Any): Unit
- Definition Classes
- DefaultRenderContext → RenderContext
-
def
<<<(v: Any): Unit
- Definition Classes
- DefaultRenderContext → RenderContext
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attribute[T](name: String): T
- Definition Classes
- RenderContext
-
def
attributeKeys: List[String]
- Definition Classes
- RenderContext
-
def
attributeOrElse[T](name: String, defaultValue: ⇒ T): T
- Definition Classes
- RenderContext
-
val
attributes: AttributeMap
- Definition Classes
- ServletRenderContext → DefaultRenderContext → RenderContext
-
def
blankString: String
- Attributes
- protected
- Definition Classes
- RenderContext
-
def
capture(template: Template): String
- Definition Classes
- DefaultRenderContext → RenderContext
-
def
capture(body: ⇒ Unit): String
- Definition Classes
- DefaultRenderContext → RenderContext
-
def
captureAttribute(name: String)(body: ⇒ Unit): Unit
- Definition Classes
- RenderContext
-
def
captureAttributeAppend(name: String)(body: ⇒ Unit): Unit
- Definition Classes
- RenderContext
-
def
captureNodeSeq(template: Template): NodeSeq
- Definition Classes
- RenderContext
-
def
captureNodeSeq(body: ⇒ Unit): NodeSeq
- Definition Classes
- RenderContext
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
collection(objects: Traversable[AnyRef], viewName: String, separator: ⇒ Any): Unit
- Definition Classes
- RenderContext
-
def
contextPath: String
- Definition Classes
- ServletRenderContext
- def csrfKey: String
- def csrfToken: String
-
val
currentTemplate: String
- Definition Classes
- RenderContext
-
def
currentUriMinus(newQueryArgs: String): String
- Definition Classes
- ServletRenderContext
-
def
currentUriPlus(newQueryArgs: String): String
- Definition Classes
- ServletRenderContext
-
def
dateFormat: DateFormat
- Definition Classes
- RenderContext
-
def
dateFormat_=(value: DateFormat): Unit
- Definition Classes
- RenderContext
-
val
engine: TemplateEngine
- Definition Classes
- DefaultRenderContext → RenderContext
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
escape(v: Any): Unit
- Definition Classes
- RenderContext
-
val
escapeMarkup: Boolean
- Definition Classes
- RenderContext
- def fileMultiParams: FileMultiParams
- def fileParams: Map[String, FileItem]
-
def
filter(name: String, content: String): String
- Definition Classes
- RenderContext
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def flash: Map[String, Any]
-
def
flush(): Unit
- Definition Classes
- DefaultRenderContext
- def format: String
-
def
format(pattern: String, args: AnyRef*): String
- Definition Classes
- RenderContext
-
def
forward(page: String, escape: Boolean): Unit
- Definition Classes
- ServletRenderContext
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
def
include(path: String, layout: Boolean, extraBindings: Traversable[Binding]): Unit
- Definition Classes
- RenderContext
-
def
include(path: String, layout: Boolean): Unit
- Definition Classes
- RenderContext
-
def
include(path: String): Unit
- Definition Classes
- RenderContext
-
def
inject[T](implicit manifest: ClassTag[T]): T
- Definition Classes
- RenderContext
-
def
introspect(aType: Class[_]): Introspector[_]
- Definition Classes
- RenderContext
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
kernel: ServletBase
- Attributes
- protected
-
def
layout(path: String, attrMap: Map[String, Any])(body: ⇒ Unit): Unit
- Definition Classes
- RenderContext
-
def
load(uri: String): String
- Definition Classes
- RenderContext
-
def
locale: Locale
- Definition Classes
- ServletRenderContext → RenderContext
- def multiParams: MultiParams
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
noneString: String
- Definition Classes
- RenderContext
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
nullString: String
- Definition Classes
- RenderContext
-
def
numberFormat: NumberFormat
- Definition Classes
- RenderContext
-
def
numberFormat_=(value: NumberFormat): Unit
- Definition Classes
- RenderContext
-
var
out: PrintWriter
- Definition Classes
- DefaultRenderContext
-
def
parameter(name: String): String
- Definition Classes
- ServletRenderContext
-
def
parameterValues(name: String): Array[String]
- Definition Classes
- ServletRenderContext
- def params: Params
-
def
percent(number: Number): String
- Definition Classes
- RenderContext
-
def
percentFormat: NumberFormat
- Definition Classes
- RenderContext
-
def
percentFormat_=(value: NumberFormat): Unit
- Definition Classes
- RenderContext
-
def
queryString: String
- Definition Classes
- ServletRenderContext
-
def
removeOldAttributes: Boolean
- Attributes
- protected
- Definition Classes
- RenderContext
-
def
render(path: String, attributeMap: Map[String, Any]): Unit
- Definition Classes
- RenderContext
-
val
request: HttpServletRequest
- Definition Classes
- ServletRenderContext
-
def
requestDispatcher(page: String): RequestDispatcher
- Attributes
- protected
- Definition Classes
- ServletRenderContext
-
def
requestFile: Option[File]
- Definition Classes
- DefaultRenderContext → RenderContext
-
def
requestResource: Option[Resource]
- Definition Classes
- DefaultRenderContext → RenderContext
-
def
requestUri: String
- Definition Classes
- ServletRenderContext → DefaultRenderContext → RenderContext
-
def
resolveUri(path: String): String
- Attributes
- protected
- Definition Classes
- RenderContext
-
def
resource[T]: T
- Definition Classes
- RenderContext
-
def
resourceOrElse[T](defaultValue: T): T
- Definition Classes
- RenderContext
-
val
response: HttpServletResponse
- Definition Classes
- ServletRenderContext
-
def
servlet(page: String, escape: Boolean): Unit
- Definition Classes
- ServletRenderContext
-
def
servletConfig: Config
- Definition Classes
- ServletRenderContext
-
val
servletContext: ServletContext
- Definition Classes
- ServletRenderContext
- def session: HttpSession
- def sessionOption: Option[HttpSession]
-
def
setAttribute(name: String, value: Option[Any]): Unit
- Definition Classes
- RenderContext
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
implicit
def
toStringPair(entry: (Symbol, Any)): (String, Any)
- Definition Classes
- RenderContext
-
def
unescape(v: Any): Unit
- Definition Classes
- RenderContext
-
def
uri(uri: String): String
- Definition Classes
- ServletRenderContext → RenderContext
-
def
uri(file: File): Option[String]
- Definition Classes
- RenderContext
-
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 reversibleIllegalStateException
if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.
-
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 reversibleIllegalStateException
if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.
-
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 reversibleIllegalStateException
if the route's base path cannot be determined. This may occur outside of an HTTP request's lifecycle.
-
def
using[T](model: AnyRef)(op: ⇒ T): T
- Attributes
- protected
- Definition Classes
- RenderContext
-
def
value(any: Any, shouldSanitize: Boolean): Any
- Definition Classes
- RenderContext
-
def
valueEscaped(any: Any): Any
- Definition Classes
- RenderContext
-
def
valueUnescaped(any: Any): Any
- Definition Classes
- RenderContext
-
def
view(model: AnyRef, viewName: String): Unit
- Definition Classes
- RenderContext
-
val
viewPostfixes: List[String]
- Definition Classes
- RenderContext
-
val
viewPrefixes: List[String]
- Definition Classes
- RenderContext
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withAttributes[T](attrMap: Map[String, Any])(block: ⇒ T): T
- Definition Classes
- RenderContext
-
def
withUri[T](uri: String)(block: ⇒ T): T
- Definition Classes
- RenderContext
-
val
wrapCssInCData: Boolean
- Definition Classes
- RenderContext
-
def
wrappedRequest: WrappedRequest
- Attributes
- protected
- Definition Classes
- ServletRenderContext
-
def
wrappedResponse: WrappedResponse
- Attributes
- protected
- Definition Classes
- ServletRenderContext
- def xsrfKey: String
- def xsrfToken: String
Deprecated Value Members
-
def
responseFormat: String
- Annotations
- @deprecated
- Deprecated
(Since version 2.3)
format
now means the same asresponseFormat
,responseFormat
will be removed eventually