Documentation generator: JsDoc Toolkit 2.4.0
Template: Codeview 1.2
Generated on: 2012-1-23 22:35

Class Form

Class Summary
Constructor Attributes Constructor Name and Description
 
Form(fields, files)
Creates a new form with the given fields and formidable files.

Method Summary

Method Attributes Method Name and Description
<static>  
Form.createFromRequest(request)
Creates a vanilla Form from the given request.
 
createRequest(method, path, headers, protocol, multipart)
Creates a request from this form.
 
Returns a map of all field names to their values.
 
getFile(fileName)
Returns the file with the given control name.
 
getValue(fieldName)
Returns the value of the specified field.
 
serialize(stream, boundary)
Writes the form into the given stream.

Class Detail

Form(fields, files)
Creates a new form with the given fields and formidable files.
Parameters:
fields
files

Method Detail

  • <static> Form.createFromRequest(request)
    Creates a vanilla Form from the given request.
    Parameters:
    request
  • createRequest(method, path, headers, protocol, multipart)
    Creates a request from this form.
    Parameters:
    method
    path
    headers
    protocol
    multipart
    if true, use multipart encoding
  • getFields()
    Returns a map of all field names to their values.
    Returns:
    object
  • getFile(fileName)
    Returns the file with the given control name. todo support multi-file uploads
    Parameters:
    fileName
  • getValue(fieldName)
    Returns the value of the specified field.
    Parameters:
    fieldName
  • serialize(stream, boundary)
    Writes the form into the given stream.
    Parameters:
    stream
    a writable stream
    boundary
    optional multipart boundary to render multipart