Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gwtext.client.core
Class Ajax

    java.lang.Object
      com.gwtext.client.core.JsObject
          com.gwtext.client.core.Connection
              com.gwtext.client.core.Ajax

    public class Ajax

extends Connection

Global Ajax request class. This class is a singleton and cannot be created directly.

Nested Class Summary

Nested classes/interfaces inherited from class com.gwtext.client.core.Connection
`Connection.Method`

Field Summary

Fields inherited from class com.gwtext.client.core.Connection
`GET, POST`

Fields inherited from class com.gwtext.client.core.JsObject
`jsObj`

Method Summary
`static Ajax` | `getInstance()`
`java.lang.String` | `serializeForm(java.lang.String formId)` Serialize the passed form into a url encoded string
`void` | `setAutoAbort(boolean autoAbort)` Whether a new request should abort any pending requests.
`void` | `setDefaultHeaders(NameValuePair[] defaultHeaders)` Request headers which are added to each request made by this object.
`void` | `setDisableCaching(boolean disableCaching)` True to add a unique cache-buster param to GET requests.
`void` | `setExtraParams(UrlParam[] params)` Extra parameters to each request made by this object.
`void` | `setMethod(Connection.Method method)` The default HTTP method to be used for requests.
`void` | `setTimeout(int timeout)` The timeout in milliseconds to be used for requests.
`void` | `setUrl(java.lang.String url)` The default URL to be used for requests to the server.

Methods inherited from class com.gwtext.client.core.Connection
`abort, abort, addListener, isLoading, isLoading, request, request`

Methods inherited from class com.gwtext.client.core.JsObject
`getJsObj, getProperties, isCreated, setJsObj`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getInstance

    public static Ajax getInstance()

### setAutoAbort

    public void setAutoAbort(boolean autoAbort)

  Whether a new request should abort any pending requests.

  Parameters:
    `autoAbort` - defaults to false

### setDefaultHeaders

    public void setDefaultHeaders(NameValuePair[] defaultHeaders)

  Request headers which are added to each request made by this object.

  Parameters:
    `defaultHeaders` - default header params

### setDisableCaching

    public void setDisableCaching(boolean disableCaching)

  True to add a unique cache-buster param to GET requests.

  Parameters:
    `disableCaching` - defaults to true

### setExtraParams

    public void setExtraParams(UrlParam[] params)

  Extra parameters to each request made by this object.

  Parameters:
    `params` - extra params

### setMethod

    public void setMethod(Connection.Method method)

  The default HTTP method to be used for requests.

  Parameters:
    `method` - defaults to undefined; if not set but parms are present will use POST, otherwise GET

### setTimeout

    public void setTimeout(int timeout)

  The timeout in milliseconds to be used for requests.

  Parameters:
    `timeout` - defaults to 30000

### setUrl

    public void setUrl(java.lang.String url)

  The default URL to be used for requests to the server.

  Parameters:
    `url` - the url to make the request to

### serializeForm

    public java.lang.String serializeForm(java.lang.String formId)

  Serialize the passed form into a url encoded string

  Parameters:
    `formId` - the form id
  Returns:
    url encoded String

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD