Class SelectItemsTag

All Implemented Interfaces:
jakarta.servlet.jsp.tagext.BodyTag, jakarta.servlet.jsp.tagext.IterationTag, jakarta.servlet.jsp.tagext.JspIdConsumer, jakarta.servlet.jsp.tagext.JspTag, jakarta.servlet.jsp.tagext.Tag

public class SelectItemsTag
extends UIComponentELTag
This class is the tag handler that evaluates the selectitems custom tag.
  • Constructor Details

  • Method Details

    • setValue

      public void setValue​(jakarta.el.ValueExpression value)
    • setVar

      public void setVar​(String var)
    • setItemValue

      public void setItemValue​(jakarta.el.ValueExpression itemValue)
    • setItemLabel

      public void setItemLabel​(jakarta.el.ValueExpression itemLabel)
    • setItemDescription

      public void setItemDescription​(jakarta.el.ValueExpression itemDescription)
    • setItemDisabled

      public void setItemDisabled​(jakarta.el.ValueExpression itemDisabled)
    • setItemLabelEscaped

      public void setItemLabelEscaped​(jakarta.el.ValueExpression itemLabelEscaped)
    • setNoSelectionOption

      public void setNoSelectionOption​(jakarta.el.ValueExpression noSelectionOption)
    • getRendererType

      public String getRendererType()
      Description copied from class: UIComponentTagBase

      Return the rendererType property that selects the Renderer to be used for encoding this component, or null to ask the component to render itself directly. Subclasses must override this method to return the appropriate value.

      Specified by:
      getRendererType in class UIComponentTagBase
      Returns:
      the renderer type
      See Also:
      UIComponentTagBase.getRendererType()
    • getComponentType

      public String getComponentType()
      Description copied from class: UIComponentTagBase

      Return the component type for the component that is or will be bound to this tag. This value can be passed to Application.createComponent(java.lang.String) to create the UIComponent instance for this tag. Subclasses must override this method to return the appropriate value.

      Specified by:
      getComponentType in class UIComponentTagBase
      Returns:
      the component type
      See Also:
      UIComponentTagBase.getComponentType(), UISelectItems.COMPONENT_TYPE
    • setProperties

      protected void setProperties​(UIComponent component)
      Description copied from class: UIComponentELTag

      Override properties and attributes of the specified component, if the corresponding properties of this tag handler instance were explicitly set. This method must be called ONLY if the specified UIComponent was in fact created during the execution of this tag handler instance, and this call will occur BEFORE the UIComponent is added to the view.

      Tag subclasses that want to support additional set properties must ensure that the base class setProperties() method is still called. A typical implementation that supports extra properties foo and bar would look something like this:

       protected void setProperties(UIComponent component) {
           super.setProperties(component);
           if (foo != null) {
               component.setAttribute("foo", foo);
           }
           if (bar != null) {
               component.setAttribute("bar", bar);
           }
       }
       

      The default implementation overrides the following properties:

      • rendered - Set if a value for the rendered property is specified for this tag handler instance.
      • rendererType - Set if the getRendererType() method returns a non-null value.
      Overrides:
      setProperties in class UIComponentELTag
      Parameters:
      component -
      See Also:
      UIComponentELTag.setProperties(jakarta.faces.component.UIComponent)