xitrum.routing

JSRoutesAction

class JSRoutesAction extends Action

Annotations
@GET()
Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JSRoutesAction
  2. Action
  3. I18n
  4. Responder
  5. Knockout
  6. Flash
  7. JS
  8. Renderer
  9. UrlFor
  10. Redirect
  11. BasicAuth
  12. Filter
  13. Net
  14. Logger
  15. SessionEnv
  16. CSRF
  17. RequestEnv
  18. ParamAccess
  19. AnyRef
  20. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JSRoutesAction()

Type Members

  1. sealed class DefaultsTo[A, B] extends AnyRef

    Definition Classes
    ParamAccess
  2. trait LowPriorityDefaultsTo extends AnyRef

    Definition Classes
    ParamAccess

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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. object DefaultsTo extends Action.LowPriorityDefaultsTo

    Definition Classes
    ParamAccess
  7. def absUrl[T <: Action](implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  8. def absUrl[T <: Action](params: (String, Any)*)(implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  9. def absUrl(params: (String, Any)*): String

    Definition Classes
    UrlFor
  10. lazy val absUrl: String

    Definition Classes
    UrlFor
  11. lazy val absUrlPrefix: String

    Definition Classes
    Net
  12. lazy val absUrlPrefixWithoutScheme: String

    Definition Classes
    Net
  13. def addConnectionClosedListener(listener: ⇒ Unit): Unit

    Definition Classes
    Action
  14. def afterFilter(f: ⇒ Any): Unit

    Definition Classes
    Filter
  15. lazy val antiCSRFInput: String

    Definition Classes
    CSRF
  16. lazy val antiCSRFMeta: String

    Definition Classes
    CSRF
  17. def antiCSRFToken: String

    Definition Classes
    CSRF
  18. def apply(handlerEnv: HandlerEnv): Unit

    Definition Classes
    RequestEnv
  19. def aroundFilter(f: (() ⇒ Any) ⇒ Any): Unit

    Definition Classes
    Filter
  20. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  21. lazy val at: At

    Definition Classes
    RequestEnv
  22. def autosetLanguage(resourceLanguages: String*): Unit

    If there's no suitable language, language is still the default "en".

    If there's no suitable language, language is still the default "en".

    Definition Classes
    I18n
  23. def basicAuth(realm: String)(authenticator: (String, String) ⇒ Boolean): Boolean

    authenticator

    takes username and password, returns true if it want to let the user in.

    Definition Classes
    BasicAuth
  24. def beforeFilter(f: ⇒ Boolean): Unit

    Definition Classes
    Filter
  25. def browserLanguages: Array[String]

    returns

    List of languages sorted by priority from high to low

    Definition Classes
    I18n
  26. def callAfterFilters(): Unit

    Called by Dispatcher

    Called by Dispatcher

    Definition Classes
    Filter
  27. def callBeforeFilters(): Boolean

    Called by Dispatcher

    Called by Dispatcher

    Definition Classes
    Filter
  28. def callExecuteWrappedInAroundFilters(): Unit

    Called by Dispatcher

    Called by Dispatcher

    Definition Classes
    Filter
  29. lazy val channel: Channel

    Definition Classes
    RequestEnv
  30. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. def convertText[T](value: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T

    Applications may override this method to convert to more types.

    Applications may override this method to convert to more types.

    Definition Classes
    ParamAccess
  32. implicit val currentAction: Action

    Definition Classes
    Action
  33. def dispatchWithFailsafe(): Unit

    Definition Classes
    Action
  34. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  36. def execute(): Unit

    Called when the HTTP request comes in.

    Called when the HTTP request comes in. Actions have to implement this method.

    Definition Classes
    JSRoutesActionAction
  37. lazy val fileUploadParams: FileUploadParams

    Definition Classes
    RequestEnv
  38. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. def flash(): String

    Returns the current content in flash, and clears the flash.

    Returns the current content in flash, and clears the flash.

    Definition Classes
    Flash
  40. def flash(msg: Any): Unit

    Definition Classes
    Flash
    See also

    jsFlash(msg).

  41. def forwardTo[T <: Action]()(implicit arg0: Manifest[T]): Unit

    Tells another action to process the current request for the current action.

    Tells another action to process the current request for the current action. See also redirectTo.

    Definition Classes
    Redirect
  42. var forwarding: Boolean

    Set to true by forwardTo.

    Set to true by forwardTo.

    Definition Classes
    Redirect
  43. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  44. def getLanguage: String

    Default language is "en".

    Default language is "en".

    Definition Classes
    I18n
  45. var handlerEnv: HandlerEnv

    Definition Classes
    RequestEnv
  46. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  47. lazy val isAjax: Boolean

    Definition Classes
    JS
  48. def isDoneResponding: Boolean

    Definition Classes
    Responder
  49. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  50. lazy val isSsl: Boolean

    Definition Classes
    Net
  51. def js$(selector: String): String

    Definition Classes
    JS
  52. def js$id(id: String): String

    Definition Classes
    JS
  53. def js$name(name: String): String

    Definition Classes
    JS
  54. def jsAddToView(js: Any): Unit

    Definition Classes
    JS
  55. lazy val jsDefaults: Group

    Definition Classes
    JS
  56. def jsEscape(string: Any): String

    Do not use this to escape JSON, because they are different! For example JSON does not escape ' character, while JavaScript does.

    Do not use this to escape JSON, because they are different! For example JSON does not escape ' character, while JavaScript does. To escape JSON, use JSON4S or xitrum.util.Json, e.g xitrum.util.Json.generate(Seq(string)).

    org.apache.commons.lang3.StringEscapeUtils is used internally.

    Definition Classes
    JS
  57. lazy val jsForView: Serializable

    Definition Classes
    JS
  58. def jsRedirectTo[T <: Action](params: (String, Any)*)(implicit arg0: Manifest[T]): ChannelFuture

    Definition Classes
    JS
  59. def jsRedirectTo(location: Any): ChannelFuture

    See http://stackoverflow.

    See http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery

    Definition Classes
    JS
  60. def jsRenderFlash(): Unit

    Like jsRenderFlash(msg), but uses the current flash.

    Like jsRenderFlash(msg), but uses the current flash.

    Definition Classes
    Flash
  61. def jsRenderFlash(msg: Any): Unit

    For web 2.

    For web 2.0 style application. Used in application layout to display the flash message right after a view is loaded.

    Definition Classes
    Flash
  62. def jsRespond(fragments: Any*): ChannelFuture

    Definition Classes
    JS
  63. def jsRespondFlash(msg: Any): Unit

    For web 2.

    For web 2.0 style application. Used in Ajax request handling to respond a message and have the browser render it to the flash area right away.

    Definition Classes
    Flash
  64. def koApplyBindingsCs(model: AnyRef, scopeSelector: String, syncActionClass: Class[_ <: Action], cs: String): Unit

    Definition Classes
    Knockout
  65. def koApplyBindingsCs(model: AnyRef, syncActionClass: Class[_ <: Action], cs: String): Unit

    Definition Classes
    Knockout
  66. def koApplyBindingsJs(model: AnyRef, scopeSelector: String, syncActionClass: Class[_ <: Action], js: String): Unit

    Definition Classes
    Knockout
  67. def koApplyBindingsJs(model: AnyRef, syncActionClass: Class[_ <: Action], js: String): Unit

    Definition Classes
    Knockout
  68. def layout: Any

    Definition Classes
    Renderer
  69. lazy val logger: org.slf4j.Logger

    Logger name is inferred from the class name.

    Logger name is inferred from the class name.

    Definition Classes
    Logger
  70. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  71. final def notify(): Unit

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

    Definition Classes
    AnyRef
  73. def onDoneResponding(): Unit

    Called when the response or the last chunk (in case of chunked response) has been sent to the client.

    Called when the response or the last chunk (in case of chunked response) has been sent to the client.

    Definition Classes
    Responder
  74. def param[T](key: String, coll: Params = null)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], d: DefaultsTo[T, String]): T

    Definition Classes
    ParamAccess
  75. def paramo[T](key: String, coll: Params = null)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], d: DefaultsTo[T, String]): Option[T]

    Definition Classes
    ParamAccess
  76. def params[T](key: String, coll: Params = null)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], d: DefaultsTo[T, String]): Seq[T]

    Definition Classes
    ParamAccess
  77. def paramso[T](key: String, coll: Params = null)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T], d: DefaultsTo[T, String]): Option[Seq[T]]

    Definition Classes
    ParamAccess
  78. def publicUrl(path: String): String

    path

    Relative to the "public" directory, without leading "/"

    Definition Classes
    UrlFor
  79. def redirectTo[T <: Action](params: (String, Any)*)(implicit arg0: Manifest[T]): ChannelFuture

    See also forwardTo.

    See also forwardTo.

    Definition Classes
    Redirect
  80. def redirectTo(location: String, status: HttpResponseStatus = FOUND): ChannelFuture

    See also forwardTo.

    See also forwardTo.

    Definition Classes
    Redirect
  81. def redirectToThis(params: (String, Any)*): ChannelFuture

    Definition Classes
    Redirect
  82. lazy val remoteIp: String

    returns

    IP of the original remote HTTP client (not the proxy), X-Forwarded-For is supported

    Definition Classes
    Net
  83. def renderEventSource(data: Any, event: String = "message"): String

    Definition Classes
    Renderer
  84. def renderFragment(fragment: String): String

    Definition Classes
    Renderer
  85. def renderFragment(location: Class[_ <: Action], fragment: String): String

    Definition Classes
    Renderer
  86. def renderFragment(fragment: String, options: Map[String, Any]): String

    Definition Classes
    Renderer
  87. def renderFragment(location: Class[_ <: Action], fragment: String, options: Map[String, Any]): String

    Definition Classes
    Renderer
  88. def renderInlineView(inlineView: Any): String

    Definition Classes
    Renderer
  89. def renderView(): String

    Definition Classes
    Renderer
  90. def renderView(options: Map[String, Any]): String

    Definition Classes
    Renderer
  91. def renderView(location: Class[_ <: Action]): String

    Definition Classes
    Renderer
  92. def renderView(customLayout: () ⇒ Any): String

    Definition Classes
    Renderer
  93. def renderView(customLayout: () ⇒ Any, location: Class[_ <: Action]): String

    Definition Classes
    Renderer
  94. def renderView(customLayout: () ⇒ Any, options: Map[String, Any]): String

    Definition Classes
    Renderer
  95. def renderView(location: Class[_ <: Action], options: Map[String, Any]): String

    Definition Classes
    Renderer
  96. def renderView(customLayout: () ⇒ Any, location: Class[_ <: Action], options: Map[String, Any]): String

    Renders the template associated with an action to "renderedTemplate", then calls the layout function.

    Renders the template associated with an action to "renderedTemplate", then calls the layout function.

    options

    specific to the configured template engine

    Definition Classes
    Renderer
  97. def renderViewNoLayout(): String

    Definition Classes
    Renderer
  98. def renderViewNoLayout(options: Map[String, Any]): String

    Definition Classes
    Renderer
  99. def renderViewNoLayout(location: Class[_ <: Action]): String

    Definition Classes
    Renderer
  100. def renderViewNoLayout(location: Class[_ <: Action], options: Map[String, Any]): String

    Definition Classes
    Renderer
  101. var renderedView: Any

    Definition Classes
    Renderer
  102. lazy val request: HttpRequest

    Definition Classes
    RequestEnv
  103. lazy val requestCookies: Map[String, String]

    Browsers will not send cookie attributes back to the server.

    Browsers will not send cookie attributes back to the server. They will only send the cookie (name-value pairs). http://en.wikipedia.org/wiki/HTTP_cookie#Cookie_attributes

    Definition Classes
    SessionEnv
  104. def resourceUrl(path: String): String

    path

    Relative to an entry in classpath, without leading "/"

    Definition Classes
    UrlFor
  105. def respond(): ChannelFuture

    Definition Classes
    Responder
  106. def respondBinary(channelBuffer: ChannelBuffer): ChannelFuture

    If Content-Type header is not set, it is set to "application/octet-stream"

    If Content-Type header is not set, it is set to "application/octet-stream"

    Definition Classes
    Responder
  107. def respondBinary(bytes: Array[Byte]): ChannelFuture

    If Content-Type header is not set, it is set to "application/octet-stream"

    If Content-Type header is not set, it is set to "application/octet-stream"

    Definition Classes
    Responder
  108. def respondDefault404Page(): ChannelFuture

    Definition Classes
    Responder
  109. def respondDefault500Page(): ChannelFuture

    Definition Classes
    Responder
  110. def respondEventSource(data: Any, event: String = "message"): ChannelFuture

    To respond event source, call this method as many time as you want.

    To respond event source, call this method as many time as you want. Event Source response is a special kind of chunked response. Data must be Must be UTF-8. See: - http://sockjs.github.com/sockjs-protocol/sockjs-protocol-0.3.3.html#section-94 - http://dev.w3.org/html5/eventsource/

    Definition Classes
    Responder
  111. def respondFile(path: String): ChannelFuture

    Sends a file using X-SendFile.

    Sends a file using X-SendFile. If Content-Type header is not set, it is guessed from the file name.

    path

    absolute or relative to the current working directory

    In some cases, the current working directory is not always the root directory of the project (https://github.com/ngocdaothanh/xitrum/issues/47), you may need to use xitrum.Config.root to calculate the correct absolute path from a relative path.

    To sanitize the path, use xitrum.util.PathSanitizer.

    Definition Classes
    Responder
  112. def respondHtml(any: Any): ChannelFuture

    Content-Type header is set to "text/html".

    Content-Type header is set to "text/html".

    Definition Classes
    Responder
  113. def respondInlineView(inlineView: Any): ChannelFuture

    Content-Type header is set to "text/html"

    Content-Type header is set to "text/html"

    Definition Classes
    Responder
  114. def respondJs(any: Any): ChannelFuture

    Content-Type header is set to "application/javascript".

    Content-Type header is set to "application/javascript".

    Definition Classes
    Responder
  115. def respondJson(obj: AnyRef): ChannelFuture

    Converts the given Scala object to JSON object, and responds it.

    Converts the given Scala object to JSON object, and responds it. If you just want to respond a text with "application/json" as content type, use respondJsonText(text).

    Content-Type header is set to "application/json". "text/json" would make the browser download instead of displaying the content. It makes debugging a pain.

    Definition Classes
    Responder
  116. def respondJsonP(obj: AnyRef, function: String): ChannelFuture

    Converts the given Scala object to JSON object, wraps it with the given JavaScript function name, and responds.

    Converts the given Scala object to JSON object, wraps it with the given JavaScript function name, and responds. If you already have a JSON text, thus no conversion is needed, use respondJsonPText.

    Content-Type header is set to "application/javascript".

    Definition Classes
    Responder
  117. def respondJsonPText(text: Any, function: String): ChannelFuture

    Wraps the text with the given JavaScript function name, and responds.

    Wraps the text with the given JavaScript function name, and responds.

    Content-Type header is set to "application/javascript".

    Definition Classes
    Responder
  118. def respondJsonText(any: Any): ChannelFuture

    Content-Type header is set to "application/json".

    Content-Type header is set to "application/json".

    Definition Classes
    Responder
  119. def respondLastChunk(): ChannelFuture

    To respond chunks (http://en.

    To respond chunks (http://en.wikipedia.org/wiki/Chunked_transfer_encoding): 1. Call response.setChunked(true) 2. Call respondXXX as many times as you want 3. Lastly, call respondLastChunk()

    Headers are only sent on the first respondXXX call.

    Definition Classes
    Responder
  120. def respondResource(path: String): ChannelFuture

    Sends a file from public directory in one of the entry (may be a JAR file) in classpath.

    Sends a file from public directory in one of the entry (may be a JAR file) in classpath. If Content-Type header is not set, it is guessed from the file name.

    path

    Relative to an entry in classpath, without leading "/"

    Definition Classes
    Responder
  121. def respondText(text: Any, fallbackContentType: String = null, convertXmlToXhtml: Boolean = true): ChannelFuture

    fallbackContentType

    Only used if Content-Type header has not been set. If not given and Content-Type header is not set, it is set to "application/xml" if text param is Node or NodeSeq, otherwise it is set to "text/plain".

    convertXmlToXhtml


    .toString by default returns

    which is rendered as 2
    tags on some browsers! Set to false if you really want XML, not XHTML. See http://www.scala-lang.org/node/492 and http://www.ne.jp/asahi/hishidama/home/tech/scala/xml.html

    Definition Classes
    Responder
  122. def respondView(): ChannelFuture

    Definition Classes
    Responder
  123. def respondView(options: Map[String, Any]): ChannelFuture

    Definition Classes
    Responder
  124. def respondView(location: Class[_ <: Action]): ChannelFuture

    Definition Classes
    Responder
  125. def respondView(customLayout: () ⇒ Any): ChannelFuture

    Definition Classes
    Responder
  126. def respondView(customLayout: () ⇒ Any, location: Class[_ <: Action]): ChannelFuture

    Definition Classes
    Responder
  127. def respondView(customLayout: () ⇒ Any, options: Map[String, Any]): ChannelFuture

    Definition Classes
    Responder
  128. def respondView(location: Class[_ <: Action], options: Map[String, Any]): ChannelFuture

    Definition Classes
    Responder
  129. def respondView(customLayout: () ⇒ Any, location: Class[_ <: Action], options: Map[String, Any]): ChannelFuture

    options

    specific to the configured template engine

    Definition Classes
    Responder
  130. def respondViewNoLayout(): ChannelFuture

    Definition Classes
    Responder
  131. def respondViewNoLayout(options: Map[String, Any]): ChannelFuture

    Definition Classes
    Responder
  132. def respondViewNoLayout(location: Class[_ <: Action]): ChannelFuture

    Definition Classes
    Responder
  133. def respondViewNoLayout(location: Class[_ <: Action], options: Map[String, Any]): ChannelFuture

    Content-Type header is set to "text/html"

    Content-Type header is set to "text/html"

    Definition Classes
    Responder
  134. def respondXml(any: Any): ChannelFuture

    Content-Type header is set to "application/xml".

    Content-Type header is set to "application/xml".

    Definition Classes
    Responder
  135. lazy val response: HttpResponse

    Definition Classes
    RequestEnv
  136. val responseCookies: ArrayBuffer[Cookie]

    Definition Classes
    SessionEnv
  137. lazy val scheme: String

    Definition Classes
    Net
  138. lazy val serverName: String

    Definition Classes
    Net
  139. lazy val serverPort: Int

    Definition Classes
    Net
  140. lazy val session: Session

    To reset session: session.

    To reset session: session.clear()

    Definition Classes
    SessionEnv
  141. def sessiono[T](key: String)(implicit d: DefaultsTo[T, String]): Option[T]

    Definition Classes
    SessionEnv
  142. def setClientCacheAggressively(): Unit

    Definition Classes
    Responder
  143. def setCookieAndSessionIfTouchedOnRespond(): Unit

    Definition Classes
    SessionEnv
  144. def setLanguage(language: String): Unit

    Definition Classes
    I18n
  145. def setNoClientCache(): Unit

    Definition Classes
    Responder
  146. def sockJsAbsUrl[T <: SockJsActor](implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  147. def sockJsUrl[T <: SockJsActor](implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  148. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  149. def t(singular: String): String

    Definition Classes
    I18n
  150. def tc(ctx: String, singular: String): String

    Definition Classes
    I18n
  151. def tcf(ctx: String, singular: String, args: Any*): String

    Definition Classes
    I18n
  152. def tcn(ctx: String, singular: String, plural: String, n: Long): String

    Definition Classes
    I18n
  153. def tcnf(ctx: String, singular: String, plural: String, n: Long, args: Any*): String

    Definition Classes
    I18n
  154. lazy val textParams: Params

    Definition Classes
    RequestEnv
  155. def tf(singular: String, args: Any*): String

    Definition Classes
    I18n
  156. def tn(singular: String, plural: String, n: Long): String

    Definition Classes
    I18n
  157. def tnf(singular: String, plural: String, n: Long, args: Any*): String

    Definition Classes
    I18n
  158. def toString(): String

    Definition Classes
    AnyRef → Any
  159. def url[T <: Action](implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  160. def url[T <: Action](params: (String, Any)*)(implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  161. def url(params: (String, Any)*): String

    Definition Classes
    UrlFor
  162. lazy val url: String

    Definition Classes
    UrlFor
  163. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  166. lazy val webSocketAbsRequestUrl: String

    Definition Classes
    Net
  167. def webSocketAbsUrl[T <: WebSocketActor](implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  168. def webSocketAbsUrl[T <: WebSocketActor](params: (String, Any)*)(implicit arg0: Manifest[T]): String

    Definition Classes
    UrlFor
  169. def webSocketAbsUrl(params: (String, Any)*): String

    Definition Classes
    UrlFor
  170. lazy val webSocketAbsUrl: String

    Definition Classes
    UrlFor
  171. lazy val webSocketAbsUrlPrefix: String

    Definition Classes
    Net
  172. lazy val webSocketScheme: String

    Definition Classes
    Net
  173. lazy val xitrumCSS: String

    Definition Classes
    Flash

Inherited from Action

Inherited from I18n

Inherited from Responder

Inherited from Knockout

Inherited from Flash

Inherited from JS

Inherited from Renderer

Inherited from UrlFor

Inherited from Redirect

Inherited from BasicAuth

Inherited from Filter

Inherited from Net

Inherited from Logger

Inherited from SessionEnv

Inherited from CSRF

Inherited from RequestEnv

Inherited from ParamAccess

Inherited from AnyRef

Inherited from Any

Ungrouped