org.fusesource.scalate

RenderContext

trait RenderContext extends AnyRef

Provides helper methods for rendering templates and values and for working with attributes.

See also

org.fusesource.scalate.servlet.ServletRenderContext

,

DefaultRenderContext

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. RenderContext
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

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

    Used to represent some text which does not need escaping

Abstract Value Members

  1. def << (value: 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.

    Attributes
    abstract
  2. def <<< (value: 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.

    Attributes
    abstract
  3. def attributes : AttributeMap

    Access the attributes available in this context

    Access the attributes available in this context

    Attributes
    abstract
  4. 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

    Attributes
    abstract
  5. def capture (body: ⇒ Unit): String

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

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

    Attributes
    abstract
  6. def engine : TemplateEngine

    Attributes
    abstract
  7. def requestFile : Option[File]

    Returns the file for the given request resource

    Returns the file for the given request resource

    Attributes
    abstract
  8. def requestResource : Option[Resource]

    Returns the Resource of the request

    Returns the Resource of the request

    Attributes
    abstract
  9. def requestUri : String

    Returns the request URI

    Returns the request URI

    Attributes
    abstract

Concrete Value Members

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

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

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def attribute [T] (name: String): T

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

  8. def attributeKeys : List[String]

    Sorted list of attribute keys

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

  10. def blankString : String

    Attributes
    protected
  11. def captureAttribute (name: String)(body: ⇒ Unit): Unit

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

  12. def captureAttributeAppend (name: String)(body: ⇒ Unit): Unit

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

  13. def captureNodeSeq (template: Template): NodeSeq

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

  14. def captureNodeSeq (body: ⇒ Unit): NodeSeq

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

  15. def clone (): AnyRef

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

    Renders a collection of model objects with an optional separator

  17. var currentTemplate : String

  18. def dateFormat : DateFormat

  19. def dateFormat_= (value: DateFormat): Unit

  20. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  21. def equals (arg0: Any): Boolean

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

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

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

  24. def filter (name: String, content: String): String

  25. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  26. 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

  27. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  28. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  29. 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

  30. def include (path: String, layout: Boolean): Unit

  31. def include (path: String): Unit

  32. def inject [T] (implicit manifest: Manifest[T]): T

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

  33. def introspect (aType: Class[_]): org.fusesource.scalate.introspector.Introspector[_]

  34. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  35. 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.

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

  37. def locale : Locale

  38. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  39. var noneString : String

    Default string used to output None values

  40. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  41. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  42. var nullString : String

    Default string used to output null values

  43. def numberFormat : NumberFormat

  44. def numberFormat_= (value: NumberFormat): Unit

  45. def percent (number: Number): String

  46. def percentFormat : NumberFormat

  47. def percentFormat_= (value: NumberFormat): Unit

  48. 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
  49. def render (path: String, attributeMap: Map[String, Any] = Map()): Unit

    Renders the given template with optional attributes

  50. def resolveUri (path: String): String

    Attributes
    protected
  51. def resource [T] : T

    Returns the JAXRS resource bean of the given type or a NoValueSetException exception is thrown

  52. def resourceOrElse [T] (defaultValue: T): T

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

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

  54. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  55. def toString (): String

    Definition Classes
    AnyRef → Any
  56. 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) {...}

    Attributes
    implicit
  57. def unescape (v: Any): Unit

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

  58. def uri (u: String): String

    Allows conversion of an absolute URL starting with "/" to be converted using the prefix of a web application

  59. def uri (file: File): Option[String]

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

  60. def using [T] (model: AnyRef)(op: ⇒ T): T

    Attributes
    protected
  61. def value (any: Any, shouldSanitize: Boolean = escapeMarkup): Any

  62. def valueEscaped (any: Any): Any

  63. def valueUnescaped (any: Any): Any

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

  65. var viewPostfixes : List[String]

  66. var viewPrefixes : List[String]

  67. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  70. 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)

  71. def withUri [T] (uri: String)(block: ⇒ T): T

  72. var wrapCssInCData : Boolean

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

Inherited from AnyRef

Inherited from Any