totalcross.ui.html
Class Form

totalcross.lang.Object
  extended by totalcross.ui.html.Form

public class Form
extends totalcross.lang.Object

Form links all Input element attached to it.


Field Summary
 String method
           
 String url
           
 
Constructor Summary
Form(Form previous, AttributeList atts)
          Constructor
 
Method Summary
 String buildURL(String buttonName)
          Builds the URL with all form values.
static 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, String val)
          Sets the value of the given Control.
 void submit(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 totalcross.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

public String method

url

public 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 String buildURL(String buttonName)
Builds the URL with all form values.


submit

public void submit(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 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,
                            String val)
Sets the value of the given Control.