Codota Logo
Form.getType
Code IndexAdd Codota to your IDE (free)

How to use
getType
method
in
org.jivesoftware.smackx.xdata.Form

Best Java code snippets using org.jivesoftware.smackx.xdata.Form.getType (Showing top 1 results out of 315)

  • Common ways to obtain Form
private void myMethod () {
Form f =
  • Codota IconStanza packet;Form.getFormFrom(packet)
  • Codota IconMultiUserChat multiUserChat;multiUserChat.getConfigurationForm()
  • Codota IconDataForm.Type type;new Form(type)
  • Smart code suggestions by Codota
}
origin: igniterealtime/Smack

/**
 * Returns a DataForm that serves to send this Form to the server. If the form is of type
 * submit, it may contain fields with no value. These fields will be removed since they only
 * exist to assist the user while editing/completing the form in a UI.
 *
 * @return the wrapped DataForm.
 */
public DataForm getDataFormToSend() {
  if (isSubmitType()) {
    // Create a new DataForm that contains only the answered fields
    DataForm dataFormToSend = new DataForm(getType());
    for (FormField field : getFields()) {
      if (!field.getValues().isEmpty()) {
        dataFormToSend.addField(field);
      }
    }
    return dataFormToSend;
  }
  return dataForm;
}
org.jivesoftware.smackx.xdataFormgetType

Javadoc

Returns the meaning of the data within the context. The data could be part of a form to fill out, a form submission or data results.

Popular methods of Form

  • createAnswerForm
    Returns a new Form to submit the completed values. The new Form will include all the fields of the o
  • setAnswer
    Sets a new Object value to a given form's field. In fact, the object representation (i.e. #toString)
  • <init>
    Creates a new Form that will wrap an existing DataForm. The wrapped DataForm must be used for gather
  • addField
    Adds a new field to complete as part of the form.
  • getDataFormToSend
    Returns a DataForm that serves to send this Form to the server. If the form is of type submit, it ma
  • getField
    Returns the field of the form whose variable matches the specified variable. The fields of type FIXE
  • getFields
    Returns a List of the fields that are part of the form.
  • getFormFrom
    Returns a new ReportedData if the stanza is used for gathering data and includes an extension that m
  • setDefaultAnswer
    Sets the default value as the value of a given form's field. The field whose variable matches the re
  • getInstructions
    Returns the instructions that explain how to fill out the form and what the form is about.
  • hasField
    Check if a field with the given variable exists.
  • isFormType
    Returns true if the form is a form to fill out.
  • hasField,
  • isFormType,
  • isSubmitType,
  • setInstructions,
  • setTitle,
  • validateThatFieldIsText

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.This exception may include information for locating the er
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now