Class RadioChoice<T>

    • Method Detail

      • getPrefix

        public java.lang.String getPrefix()
        Returns:
        Prefix to use before choice
      • getPrefix

        protected java.lang.String getPrefix​(int index,
                                             T choice)
        Parameters:
        index - index of the choice
        choice - the choice itself
        Returns:
        Prefix to use before choice. The default implementation just returns getPrefix(). Override to have a prefix dependent on the choice item.
      • getSuffix

        protected java.lang.String getSuffix​(int index,
                                             T choice)
        Parameters:
        index - index of the choice
        choice - the choice itself
        Returns:
        Separator to use between radio options. The default implementation just returns getSuffix(). Override to have a prefix dependent on the choice item.
      • setPrefix

        public final RadioChoice<T> setPrefix​(java.lang.String prefix)
        Parameters:
        prefix - Prefix to use before choice
        Returns:
        this
      • getSuffix

        public java.lang.String getSuffix()
        Returns:
        Separator to use between radio options
      • setSuffix

        public final RadioChoice<T> setSuffix​(java.lang.String suffix)
        Parameters:
        suffix - Separator to use between radio options
        Returns:
        this
      • setLabelPosition

        public RadioChoice<T> setLabelPosition​(AbstractChoice.LabelPosition labelPosition)
        Sets the preferred position of the <label> for each choice
        Parameters:
        labelPosition - The preferred position for the label
        Returns:
        this instance, for chaining
      • appendOptionHtml

        protected void appendOptionHtml​(org.apache.wicket.util.string.AppendingStringBuffer buffer,
                                        T choice,
                                        int index,
                                        java.lang.String selected)
        Generates and appends html for a single choice into the provided buffer
        Overrides:
        appendOptionHtml in class AbstractChoice<T,​T>
        Parameters:
        buffer - Appending string buffer that will have the generated html appended
        choice - Choice object
        index - The index of this option
        selected - The currently selected string value
      • getAdditionalAttributesForLabel

        protected org.apache.wicket.util.value.IValueMap getAdditionalAttributesForLabel​(int index,
                                                                                         T choice)
        You may subclass this method to provide additional attributes to the <label ..> tag.
        Parameters:
        index - index of the choice
        choice - the choice itself
        Returns:
        tag attribute name/value pairs.
      • getAdditionalAttributes

        protected org.apache.wicket.util.value.IValueMap getAdditionalAttributes​(int index,
                                                                                 T choice)
        You may subclass this method to provide additional attributes to the <input ..> tag.
        Parameters:
        index - index of the choice
        choice - the choice itself
        Returns:
        tag attribute name/value pairs.