Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

formatBV

  • formatBV(str: string, params: string[]): string
  • Given a message with placeholders, replaces the placeholders with the given parameters. The format of the message is similar to, but not quite the same as, the format used by java.text.MessageFormat.

    formatBV("Value required for element {0}", ["", "", "", "email"]) // => "Value required for element email"
    formatBV("Use {0} braces like this: '{0}'", ["", "", "", "simple"]) // => "Use simple braces like this: 'simple'"
    

    Parameters

    • str: string

      A message with placeholders.

    • params: string[]

      A list of parameters for the placeholders. The first three items are ignored. The item at index i corresponds to the placeholder {i-3}.

    Returns string

    The string, with the placeholders replaced by the given params.

getMessageBV

  • Used when bean validation is enabled. Creates a faces message with the given key and for the given element. The element is used to find the label that is added to the message.

    Parameters

    • element: JQuery

      Element for which to create the message.

    • Optional defaultKey: string

      Key of the message.

    • Optional msg: string

      Default message to show. May be used to find the key of the message.

    Returns FacesMessageBase

    A faces message with the given key for the given element.

Generated using TypeDoc