Class Label


public class Label extends UIBean

Renders an HTML LABEL that will allow you to output label:name combination that has the same format treatment as the rest of your UI controls.

Examples

In this example, a label is rendered. The label is retrieved from a ResourceBundle via the key attribute giving you an output of 'User Name: Ford.Prefect'. Assuming that i18n message userName corresponds to 'User Name' and the action's getUserName() method returns 'Ford.Prefect'

 
 <s:label key="userName" />
 
 
 
 <s:label name="userName" label="User Name" />
 
 
  • Field Details

  • Constructor Details

    • Label

      public Label(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.
      Specified by:
      getDefaultTemplate in class UIBean
      Returns:
      The name of the template to be used as the default.
    • evaluateExtraParams

      protected void evaluateExtraParams()
      Overrides:
      evaluateExtraParams in class UIBean
    • setFor

      public void setFor(String forAttr)