Class Password


public class Password extends TextField

Render an HTML input tag of type password.

Examples

In this example, a password control is displayed. For the label, we are calling ActionSupport's getText() to retrieve password label from a resource bundle.

 
 <s:password label="%{text('password')}" name="password" size="10" maxlength="15" />
 
 
  • Field Details

  • Constructor Details

    • Password

      public Password(ValueStack stack, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
  • Method Details

    • getDefaultTemplate

      protected String getDefaultTemplate()
      Description copied from class: UIBean
      A contract that requires each concrete UI Tag to specify which template should be used as a default. For example, the CheckboxTab might return "checkbox.vm" while the RadioTag might return "radio.vm". This value not begin with a '/' unless you intend to make the path absolute rather than relative to the current theme.
      Overrides:
      getDefaultTemplate in class TextField
      Returns:
      The name of the template to be used as the default.
    • getControlType

      protected HtmlControlType getControlType()
      Description copied from class: UIBean
      The kind of HTML control this component renders, used to decide which HTML5 constraint attributes are legal on it. Defaults to HtmlControlType.UNSUPPORTED, which supports no constraints — so a component that does not override this emits none.
      Overrides:
      getControlType in class TextField
    • evaluateExtraParams

      public void evaluateExtraParams()
      Overrides:
      evaluateExtraParams in class TextField
    • setShowPassword

      public void setShowPassword(String showPassword)