Class Form


  • public class Form
    extends java.lang.Object
    Form links all Input element attached to it.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String method  
      java.lang.String url  
    • Constructor Summary

      Constructors 
      Constructor Description
      Form​(Form previous, AttributeList atts)
      Constructor
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String buildURL​(java.lang.String buttonName)
      Builds the URL with all form values.
      static java.lang.String getValue​(Control c)
      Returns the value of the given Control.
      void reset()
      This method is called by the reset button of the form to reset the contents of the form to their default values.
      static void setValue​(Control c, java.lang.String val)
      Sets the value of the given Control.
      void submit​(java.lang.String buttonValue)
      This method is called by the submit button of the form to submit the contents of the form to the server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • method

        public java.lang.String method
      • url

        public java.lang.String url
    • Constructor Detail

      • Form

        public Form​(Form previous,
                    AttributeList atts)
        Constructor
        Parameters:
        previous - previous form, if any. null otherwise.
        atts - tag attributes
    • Method Detail

      • buildURL

        public java.lang.String buildURL​(java.lang.String buttonName)
        Builds the URL with all form values.
      • submit

        public void submit​(java.lang.String buttonValue)
        This method is called by the submit button of the form to submit the contents of the form to the server. It loops in all named containers of the form and get their value,
        Parameters:
        buttonValue - The text of the button
      • reset

        public void reset()
        This method is called by the reset button of the form to reset the contents of the form to their default values.
      • getValue

        public static java.lang.String getValue​(Control c)
        Returns the value of the given Control. Used by this Form to build the url with parameters.
      • setValue

        public static void setValue​(Control c,
                                    java.lang.String val)
        Sets the value of the given Control.