Package

views.html

helper

Permalink

package helper

Contains template helpers, for example for generating HTML forms.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. helper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. trait FieldConstructor extends NotNull

    Permalink
  2. case class FieldElements(id: String, field: Field, input: Html, args: Map[Symbol, Any], messages: Messages) extends Product with Serializable

    Permalink

Value Members

  1. object FieldConstructor

    Permalink
  2. object Implicits

    Permalink
  3. object checkbox extends checkbox

    Permalink

    Generate an HTML input checkbox.

    Generate an HTML input checkbox.

    Example:

    @checkbox(field = myForm("done"))
  4. object checkbox_Scope0

    Permalink
  5. val defaultField: (FieldElements) ⇒ play.twirl.api.HtmlFormat.Appendable

    Permalink

    Default input structure.

    Default input structure.

    <dl>
      <dt><label for="username"></dt>
      <dd><input type="text" name="username" id="username"></dd>
      <dd class="error">This field is required!</dd>
      <dd class="info">Required field.</dd>
    </dl>
  6. object defaultFieldConstructor extends defaultFieldConstructor

    Permalink

    Default field constructor.

    Default field constructor.

    It generates field as following:

    <dl class="error">
      <dt><label for="name">Your name:</label></dt>
      <dd><input type="text" id="name" name="name"></dd>
      <dd class="error">This field is required</dd>
      <dd class="info">Required</dd>
    </dl>
  7. object defaultFieldConstructor_Scope0

    Permalink
  8. object form extends form

    Permalink

    Generate an HTML form.

    Generate an HTML form.

    Example:

    @form(action = routes.Users.submit, args = 'class -> "myForm") {
      ...
    }
  9. object form_Scope0

    Permalink
  10. object input extends input

    Permalink

    Prepare a generic HTML input.

  11. object inputCheckboxGroup extends inputCheckboxGroup

    Permalink

    Generate an HTML checkbox group

    Generate an HTML checkbox group

    Example:

    @inputCheckboxGroup(
              contactForm("hobbies"),
              options = Seq("S" -> "Surfing", "R" -> "Running", "B" -> "Biking","P" -> "Paddling"),
              '_label -> "Hobbies",
              '_error -> contactForm("hobbies").error.map(_.withMessage("select one or more hobbies")))
  12. object inputCheckboxGroup_Scope0

    Permalink
  13. object inputDate extends inputDate

    Permalink

    Generate an HTML5 input date.

    Generate an HTML5 input date.

    Example:

    @inputDate(field = myForm("releaseDate"), args = 'size -> 10)
  14. object inputDate_Scope0

    Permalink
  15. object inputFile extends inputFile

    Permalink

    Generate an HTML input file.

    Generate an HTML input file.

    Example:

    @inputFile(field = myForm("name"), args = 'size -> 10)
  16. object inputFile_Scope0

    Permalink
  17. object inputPassword extends inputPassword

    Permalink

    Generate an HTML input password.

    Generate an HTML input password.

    Example:

    @inputPassword(field = myForm("password"), args = 'size -> 10)
  18. object inputPassword_Scope0

    Permalink
  19. object inputRadioGroup extends inputRadioGroup

    Permalink

    Generate an HTML radio group

    Generate an HTML radio group

    Example:

    @inputRadioGroup(
              contactForm("gender"),
              options = Seq("M"->"Male","F"->"Female"),
              '_label -> "Gender",
              '_error -> contactForm("gender").error.map(_.withMessage("select gender")))
  20. object inputRadioGroup_Scope0

    Permalink
  21. object inputText extends inputText

    Permalink

    Generate an HTML input text.

    Generate an HTML input text.

    Example:

    @inputText(field = myForm("name"), args = 'size -> 10, 'placeholder -> "Your name")
  22. object inputText_Scope0

    Permalink
  23. object input_Scope0

    Permalink
  24. object javascriptRouter extends javascriptRouter

    Permalink

    Generates a Javascript object that lets you refer to your application's routes in Javascript code

    Generates a Javascript object that lets you refer to your application's routes in Javascript code

    Example:

    @javascriptRouter("jsRoutes")(
      routes.javascript.Users.list,
      routes.javascript.Application.index
    )

    You can access your routes in JavaScript without hardcoded URL's, e.g. assuming jQuery's ajax function:

    $.ajax(jsRoutes.controllers.Users.list()).done( /* */ ).fail( /* */ )

    Each action in the generated object also has the following properties: * *type*: HTTP method * *url*: the url to be used

  25. object javascriptRouter_Scope0

    Permalink
  26. object jsloader extends jsloader

    Permalink

    Javascript CommonJS module loader

    Javascript CommonJS module loader

    Should only be used in development mode: in production, compiled Javascript should be used

  27. object jsloader_Scope0

    Permalink
  28. object options

    Permalink
  29. object repeat

    Permalink
  30. object requireJs extends requireJs

    Permalink

    RequireJS Javascript module loader.

    RequireJS Javascript module loader.

    Example:

    @requireJs(core = routes.Assets.at("javascripts/require.js").url, module = routes.Assets.at("javascripts/main").url)
  31. object requireJs_Scope0

    Permalink
  32. object select extends select

    Permalink

    Generate an HTML select.

    Generate an HTML select.

    Example:

    @select(field = myForm("isDone"), options = options(List("Yes","No")))
  33. object select_Scope0

    Permalink
  34. object textarea extends textarea

    Permalink

    Generate an HTML textarea.

    Generate an HTML textarea.

    Example:

    @textarea(field = myForm("address"), args = 'rows -> 3, 'cols -> 50)
  35. object textarea_Scope0

    Permalink
  36. def urlEncode(string: String)(implicit codec: Codec): String

    Permalink

    returns

    The url-encoded value of string using the charset provided by codec

Inherited from AnyRef

Inherited from Any

Ungrouped