Interface FormField

  • All Known Implementing Classes:
    XFormFieldImpl

    @Deprecated
    public interface FormField
    Deprecated.
    replaced by FormField
    Represents a field of a form. The field could be used to represent a question to complete, a completed question or a data returned from a search. The exact interpretation of the field depends on the context where the field is used.
    Author:
    Gaston Dombiak
    • Method Detail

      • addValue

        void addValue​(String value)
        Deprecated.
        Adds a default value to the question if the question is part of a form to fill out. Otherwise, adds an answered value to the question.
        Parameters:
        value - a default value or an answered value of the question.
      • clearValues

        void clearValues()
        Deprecated.
        Removes all the values of the field.
      • addOption

        void addOption​(String label,
                       String value)
        Deprecated.
        Adds an available option to the question that the user has in order to answer the question.
        Parameters:
        label - a label that represents the option.
        value - the value of the option.
      • setType

        void setType​(String type)
        Deprecated.
        Sets an indicative of the format for the data to answer. Valid formats are:
        • text-single -> single line or word of text
        • text-private -> instead of showing the user what they typed, you show ***** to protect it
        • text-multi -> multiple lines of text entry
        • list-single -> given a list of choices, pick one
        • list-multi -> given a list of choices, pick one or more
        • boolean -> 0 or 1, true or false, yes or no. Default value is 0
        • fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
        • hidden -> is not given to the user at all, but returned with the questionnaire
        • jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
        • jid-multi -> multiple entries for JIDs
        Parameters:
        type - an indicative of the format for the data to answer.
      • setRequired

        void setRequired​(boolean required)
        Deprecated.
        Sets if the question must be answered in order to complete the questionnaire.
        Parameters:
        required - if the question must be answered in order to complete the questionnaire.
      • setLabel

        void setLabel​(String label)
        Deprecated.
        Sets the label of the question which should give enough information to the user to fill out the form.
        Parameters:
        label - the label of the question.
      • setDescription

        void setDescription​(String description)
        Deprecated.
        Sets a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.

        If the question is of type FIXED then the description should remain empty.

        Parameters:
        description - provides extra clarification about the question.
      • isRequired

        boolean isRequired()
        Deprecated.
        Returns true if the question must be answered in order to complete the questionnaire.
        Returns:
        true if the question must be answered in order to complete the questionnaire.
      • getVariable

        String getVariable()
        Deprecated.
        Returns the variable name that the question is filling out.
        Returns:
        the variable name of the question.
      • getValues

        Iterator<String> getValues()
        Deprecated.
        Returns an Iterator for the default values of the question if the question is part of a form to fill out. Otherwise, returns an Iterator for the answered values of the question.
        Returns:
        an Iterator for the default values or answered values of the question.
      • getType

        String getType()
        Deprecated.
        Returns an indicative of the format for the data to answer. Valid formats are:
        • text-single -> single line or word of text
        • text-private -> instead of showing the user what they typed, you show ***** to protect it
        • text-multi -> multiple lines of text entry
        • list-single -> given a list of choices, pick one
        • list-multi -> given a list of choices, pick one or more
        • boolean -> 0 or 1, true or false, yes or no. Default value is 0
        • fixed -> fixed for putting in text to show sections, or just advertise your web site in the middle of the form
        • hidden -> is not given to the user at all, but returned with the questionnaire
        • jid-single -> Jabber ID - choosing a JID from your roster, and entering one based on the rules for a JID.
        • jid-multi -> multiple entries for JIDs
        Returns:
        format for the data to answer.
      • getLabel

        String getLabel()
        Deprecated.
        Returns the label of the question which should give enough information to the user to fill out the form.
        Returns:
        label of the question.
      • getDescription

        String getDescription()
        Deprecated.
        Returns a description that provides extra clarification about the question. This information could be presented to the user either in tool-tip, help button, or as a section of text before the question.

        If the question is of type FIXED then the description should remain empty.

        Returns:
        description that provides extra clarification about the question.