org.fusesource.scalate.servlet

ServletRenderContext

class ServletRenderContext extends DefaultRenderContext

A template context for use in servlets

Version

$Revision : 1.1 $

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ServletRenderContext
  2. DefaultRenderContext
  3. RenderContext
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ServletRenderContext(engine: TemplateEngine, request: HttpServletRequest, response: HttpServletResponse, servletContext: ServletContext)

  2. new ServletRenderContext(engine: TemplateEngine, out: PrintWriter, request: HttpServletRequest, response: HttpServletResponse, servletContext: ServletContext)

Type Members

  1. case class Unescaped(text: String) extends Product with Serializable

    Used to represent some text which does not need escaping

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def <<(v: Any): Unit

    Renders the provided value and inserts it into the final rendered document without sanitizing the value.

    Renders the provided value and inserts it into the final rendered document without sanitizing the value.

    Definition Classes
    DefaultRenderContextRenderContext
  5. def <<<(v: Any): Unit

    Renders the provided value, sanitizes any XML special characters and inserts it into the final rendered document.

    Renders the provided value, sanitizes any XML special characters and inserts it into the final rendered document.

    Definition Classes
    DefaultRenderContextRenderContext
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def attribute[T](name: String): T

    Returns the attribute of the given type or a org.fussesource.scalate.NoValueSetException exception is thrown

    Returns the attribute of the given type or a org.fussesource.scalate.NoValueSetException exception is thrown

    Definition Classes
    RenderContext
  10. def attributeKeys: List[String]

    Sorted list of attribute keys

    Sorted list of attribute keys

    Definition Classes
    RenderContext
  11. def attributeOrElse[T](name: String, defaultValue: ⇒ T): T

    Returns the attribute of the given name and type or the default value if it is not available

    Returns the attribute of the given name and type or the default value if it is not available

    Definition Classes
    RenderContext
  12. val attributes: AttributeMap

    Access the attributes available in this context

    Access the attributes available in this context

    Definition Classes
    ServletRenderContextDefaultRenderContextRenderContext
  13. def blankString: String

    Attributes
    protected
    Definition Classes
    RenderContext
  14. def capture(template: Template): String

    Evaluates the template capturing any output written to this page context during the body evaluation

    Evaluates the template capturing any output written to this page context during the body evaluation

    Definition Classes
    DefaultRenderContextRenderContext
  15. def capture(body: ⇒ Unit): String

    Evaluates the body capturing any output written to this page context during the body evaluation

    Evaluates the body capturing any output written to this page context during the body evaluation

    Definition Classes
    DefaultRenderContextRenderContext
  16. def captureAttribute(name: String)(body: ⇒ Unit): Unit

    Captured the body of the function call then sets it to the given attribute value

    Captured the body of the function call then sets it to the given attribute value

    Definition Classes
    RenderContext
  17. def captureAttributeAppend(name: String)(body: ⇒ Unit): Unit

    Captured the body of the function call then append it to the given attribute value

    Captured the body of the function call then append it to the given attribute value

    Definition Classes
    RenderContext
  18. def captureNodeSeq(template: Template): NodeSeq

    Captures the text of the template rendering and then parses it as markup

    Captures the text of the template rendering and then parses it as markup

    Definition Classes
    RenderContext
  19. def captureNodeSeq(body: ⇒ Unit): NodeSeq

    Captures the text of the body and then parses it as markup

    Captures the text of the body and then parses it as markup

    Definition Classes
    RenderContext
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. def collection(objects: Traversable[AnyRef], viewName: String = "index", separator: ⇒ Any = blankString): Unit

    Renders a collection of model objects with an optional separator

    Renders a collection of model objects with an optional separator

    Definition Classes
    RenderContext
  22. def contextPath: String

    Returns the forwarded context path or the current context path if its not forwarded

  23. var currentTemplate: String

    Definition Classes
    RenderContext
  24. def currentUriMinus(newQueryArgs: String): String

    Returns the current URI with query arguments (separated with &) removed

  25. def currentUriPlus(newQueryArgs: String): String

    Returns the current URI with new query arguments (separated with &)

  26. def dateFormat: DateFormat

    Definition Classes
    RenderContext
  27. def dateFormat_=(value: DateFormat): Unit

    Definition Classes
    RenderContext
  28. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  30. def escape(v: Any): Unit

    Ensures that the string value of the parameter is always markup escaped

    Ensures that the string value of the parameter is always markup escaped

    Definition Classes
    RenderContext
  31. var escapeMarkup: Boolean

    Whether or not markup sensitive characters for HTML/XML elements like & > < are escaped or not

    Whether or not markup sensitive characters for HTML/XML elements like & > < are escaped or not

    Definition Classes
    RenderContext
  32. def filter(name: String, content: String): String

    Definition Classes
    RenderContext
  33. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. def flush: Unit

    Definition Classes
    DefaultRenderContext
  35. def format(pattern: String, args: AnyRef*): String

    Returns the formatted string using the locale of the users request or the default locale if not available

    Returns the formatted string using the locale of the users request or the default locale if not available

    Definition Classes
    RenderContext
  36. def forward(page: String, escape: Boolean = false): Unit

    Forwards this request to the given page

  37. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  38. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  39. def include(path: String, layout: Boolean, extraBindings: Traversable[Binding]): Unit

    Includes the given template path

    Includes the given template path

    layout

    if true then applying the layout the included template

    Definition Classes
    RenderContext
  40. def include(path: String, layout: Boolean): Unit

    Definition Classes
    RenderContext
  41. def include(path: String): Unit

    Definition Classes
    RenderContext
  42. def inject[T](implicit manifest: ClassTag[T]): T

    Creates an instance of the given given type using dependency injection to inject the necessary values into the object

    Creates an instance of the given given type using dependency injection to inject the necessary values into the object

    Definition Classes
    RenderContext
  43. def introspect(aType: Class[_]): Introspector[_]

    Definition Classes
    RenderContext
  44. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  45. def layout(path: String, attrMap: Map[String, Any] = Map())(body: ⇒ Unit): Unit

    Renders the given template with optional attributes passing the body block as the *body* attribute so that it can be layered out using the template.

    Renders the given template with optional attributes passing the body block as the *body* attribute so that it can be layered out using the template.

    Definition Classes
    RenderContext
  46. def load(uri: String): String

    Loads the given template or file as a String for inclusion into the current page.

    Loads the given template or file as a String for inclusion into the current page.

    Useful if you want to include some client side template, particularly with a .jade extension

    Definition Classes
    RenderContext
  47. def locale: Locale

    Definition Classes
    ServletRenderContextRenderContext
  48. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. var noneString: String

    Default string used to output None values

    Default string used to output None values

    Definition Classes
    RenderContext
  50. final def notify(): Unit

    Definition Classes
    AnyRef
  51. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  52. var nullString: String

    Default string used to output null values

    Default string used to output null values

    Definition Classes
    RenderContext
  53. def numberFormat: NumberFormat

    Definition Classes
    RenderContext
  54. def numberFormat_=(value: NumberFormat): Unit

    Definition Classes
    RenderContext
  55. def parameter(name: String): String

    Returns the first parameter

  56. def parameterValues(name: String): Array[String]

    Returns all of the parameter values

  57. def percent(number: Number): String

    Definition Classes
    RenderContext
  58. def percentFormat: NumberFormat

    Definition Classes
    RenderContext
  59. def percentFormat_=(value: NumberFormat): Unit

    Definition Classes
    RenderContext
  60. def queryString: String

    Returns the forwarded query string or the current query string if its not forwarded

  61. def removeOldAttributes: Boolean

    Should we remove attributes from the context after we've rendered a child request?

    Should we remove attributes from the context after we've rendered a child request?

    Attributes
    protected
    Definition Classes
    RenderContext
  62. def render(path: String, attributeMap: Map[String, Any] = Map()): Unit

    Renders the given template with optional attributes

    Renders the given template with optional attributes

    Definition Classes
    RenderContext
  63. val request: HttpServletRequest

  64. def requestDispatcher(page: String): RequestDispatcher

    Attributes
    protected
  65. def requestFile: Option[File]

    Returns the file for the given request resource

    Returns the file for the given request resource

    Definition Classes
    DefaultRenderContextRenderContext
  66. def requestResource: Option[Resource]

    Returns the Resource of the request

    Returns the Resource of the request

    Definition Classes
    DefaultRenderContextRenderContext
  67. def requestUri: String

    Returns the forwarded request uri or the current request URI if its not forwarded

    Returns the forwarded request uri or the current request URI if its not forwarded

    Definition Classes
    ServletRenderContextDefaultRenderContextRenderContext
  68. def resolveUri(path: String): String

    Attributes
    protected
    Definition Classes
    RenderContext
  69. def resource[T]: T

    Returns the JAXRS resource bean of the given type or a org.fusesource.scalate.NoValueSetException exception is thrown

    Returns the JAXRS resource bean of the given type or a org.fusesource.scalate.NoValueSetException exception is thrown

    Definition Classes
    RenderContext
  70. def resourceOrElse[T](defaultValue: T): T

    Returns the JAXRS resource bean of the given type or the default value if it is not available

    Returns the JAXRS resource bean of the given type or the default value if it is not available

    Definition Classes
    RenderContext
  71. val response: HttpServletResponse

  72. def servlet(page: String, escape: Boolean = false): Unit

    Includes the given servlet page

  73. def servletConfig: Config

    Named servletConfig for historical reasons; actually returns a Config, which presents a unified view of either a ServletConfig or a FilterConfig.

    Named servletConfig for historical reasons; actually returns a Config, which presents a unified view of either a ServletConfig or a FilterConfig.

    returns

    a Config, if the servlet engine is a ServletTemplateEngine

    Exceptions thrown
    IllegalStateException

    if the servlet engine is not a ServletTemplateEngine

  74. val servletContext: ServletContext

  75. def setAttribute(name: String, value: Option[Any]): Unit

    Definition Classes
    RenderContext
  76. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  77. def toString(): String

    Definition Classes
    AnyRef → Any
  78. implicit def toStringPair(entry: (Symbol, Any)): (String, Any)

    Allows a symbol to be used with arguments to the { @link render } or { @link layout } method such as render("foo.ssp", 'foo -> 123, 'bar -> 456) {...} render("foo.ssp", 'foo -> 123, 'bar -> 456) {...}

    Allows a symbol to be used with arguments to the { @link render } or { @link layout } method such as render("foo.ssp", 'foo -> 123, 'bar -> 456) {...}

    Definition Classes
    RenderContext
  79. def unescape(v: Any): Unit

    Ensures that the string value of the parameter is not markup escaped

    Ensures that the string value of the parameter is not markup escaped

    Definition Classes
    RenderContext
  80. def uri(uri: String): String

    Creates a URI which if the uri starts with / then the link is prefixed with the web applications context

    Creates a URI which if the uri starts with / then the link is prefixed with the web applications context

    Definition Classes
    ServletRenderContextRenderContext
  81. def uri(file: File): Option[String]

    Returns a local link to the given file which should be within the [sourceDirectories]

    Returns a local link to the given file which should be within the [sourceDirectories]

    Definition Classes
    RenderContext
  82. def using[T](model: AnyRef)(op: ⇒ T): T

    Attributes
    protected
    Definition Classes
    RenderContext
  83. def value(any: Any, shouldSanitize: Boolean = escapeMarkup): Any

    Definition Classes
    RenderContext
  84. def valueEscaped(any: Any): Any

    Definition Classes
    RenderContext
  85. def valueUnescaped(any: Any): Any

    Definition Classes
    RenderContext
  86. def view(model: AnyRef, viewName: String = "index"): Unit

    Renders the view of the given model object, looking for the view in packageName/className.

    Renders the view of the given model object, looking for the view in packageName/className.viewName.ext

    Definition Classes
    RenderContext
  87. var viewPostfixes: List[String]

    Definition Classes
    RenderContext
  88. var viewPrefixes: List[String]

    Definition Classes
    RenderContext
  89. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  90. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  91. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  92. def withAttributes[T](attrMap: Map[String, Any])(block: ⇒ T): T

    Uses the new sets of attributes for the given block, then replace them all (and remove any newly defined attributes)

    Uses the new sets of attributes for the given block, then replace them all (and remove any newly defined attributes)

    Definition Classes
    RenderContext
  93. def withUri[T](uri: String)(block: ⇒ T): T

    Definition Classes
    RenderContext
  94. var wrapCssInCData: Boolean

    Whether we should escape CSS in CDATA sections when using the CSS filter

    Whether we should escape CSS in CDATA sections when using the CSS filter

    Definition Classes
    RenderContext
  95. def wrappedRequest: WrappedRequest

    Attributes
    protected
  96. def wrappedResponse: WrappedResponse

    Attributes
    protected

Inherited from DefaultRenderContext

Inherited from RenderContext

Inherited from AnyRef

Inherited from Any

Ungrouped