|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<DSDataFormat>
com.smartgwt.client.types.DSDataFormat
public enum DSDataFormat
Indicates the format to be used for HTTP requests and responses when
fulfilling DSRequests (eg DataSource.fetchData()
is called).
Note that RPCManager's request queuing
is only available for
"iscServer" requests.
Enum Constant Summary | |
---|---|
CUSTOM
SmartClient will not attempt to parse the response, instead, DataSource.transformResponse(com.smartgwt.client.data.DSResponse, com.smartgwt.client.data.DSRequest, java.lang.Object)
must be implemented.
transformResponse will receive the "data" parameter as a String, and
must
parse this String into an Array of Objects, which should be set as
data . |
|
ISCSERVER
Make an HTTP request in a format recognized by the ISC server and expect ISC server response format. |
|
JSON
Expect response in JSON (Java Script Object Notation) format, ready to be eval()'d. |
|
XML
Expect XML responses. |
Method Summary | |
---|---|
java.lang.String |
getValue()
|
static DSDataFormat |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static DSDataFormat[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final DSDataFormat ISCSERVER
public static final DSDataFormat XML
protocol
. This is the correct setting when
consuming
RSS feeds, XML web services (whether SOAP, REST, XML-RPC or custom format),
and XML flat files directly from
the browser.
A DSResponse will be derived from the returned XML via the process described
under
DataSource.transformResponse(com.smartgwt.client.data.DSResponse, com.smartgwt.client.data.DSRequest, java.lang.Object)
.
public static final DSDataFormat JSON
{status:0, startRow:0, endRow:50, data:[ ..]}
var response =
{status:0, startRow:0, endRow:50, data:[ ..]};
response;
protocol
.
See also XJSONDataSource
.
public static final DSDataFormat CUSTOM
DataSource.transformResponse(com.smartgwt.client.data.DSResponse, com.smartgwt.client.data.DSRequest, java.lang.Object)
must be implemented.
transformResponse
will receive the "data" parameter as a String, and
must
parse this String into an Array of Objects, which should be set as
data
.
Request format depends on the setting for
protocol
.
Note that, unlike either the "json" or "xml" settings of dataFormat
,
you
are responsible for ensuring that parsed values are the correct type, for example, using
the
JavaScript built-ins parseInt
and parseFloat
on integer
and decimal values
respectively, and using new Date()
to construct valid
Dates.
Method Detail |
---|
public static final DSDataFormat[] values()
for(DSDataFormat c : DSDataFormat.values()) System.out.println(c);
public static DSDataFormat valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic java.lang.String getValue()
getValue
in interface ValueEnum
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |