com.ibm.mashups.enabler
Interface SubmittableForm

All Superinterfaces:
Identifiable

public SubmittableForm
extends Identifiable

An interface representing a submittable form. Submittable forms can be used to import resources of models, which implement the SubmittableFormProvider interface, for example spaces or templates. The provider of submittable forms automatically set the necessary URL parameters, such as enctype, action and method. To submit a submittable form, you invoke the submit()-method, which in turn imports the resource using an appropriate xhr request.

Example:
var form = spaceModel.getSubmittableImportForm(spaceId);
form.submit().start();


Method Summary
 String getURL()
           Returns the URL this form is submitted to.
 String getMethod()
           Returns the HTTP method used to submit this form.
 Deferred submit()
           Submits the form
 
Methods inherited from interface com.ibm.mashups.enabler.Identifiable
getID
 

Method Detail

getURL

String getURL()
Returns the URL this form is submitted to. Used to fill in the action attribute in the form.

Returns:
the URL this form is submitted to; never null

getMethod

String getMethod()
Returns the HTTP method used to submit this form. Used to fill in the method attribute in the form.

Returns:
the method; never null

submit

Deferred submit()
Submits the form

Returns:
a deferred object used to start this operation.


Copyright IBM Corp. 2010 All Rights Reserved.