Class SelectOption

java.lang.Object
org.javalite.activeweb.freemarker.SelectOption

public class SelectOption extends Object
This class is used to pass data to the <@select/> tag.
Author:
Igor Polevoy: 4/12/12 1:53 PM
  • Constructor Details

    • SelectOption

      public SelectOption(String value)
      Value is used for both: value and label. Enabled, not selected by default
      Parameters:
      value - value and label to display (will be converted to string
    • SelectOption

      public SelectOption(Object value, String label)
      Enabled, not selected by default
      Parameters:
      value - option value (will be converted to string
      label - option label
    • SelectOption

      public SelectOption(Object value, String label, boolean selected)
      Creates new instance with all properties. Enabled by default.
      Parameters:
      value - option value (will be converted to string)
      label - option label
      selected - true to select, false otherwise
  • Method Details

    • getValue

      public String getValue()
    • getLabel

      public String getLabel()
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • isSelected

      public boolean isSelected()
    • setSelected

      public void setSelected(boolean selected)