|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.rpc.RPCResponse
com.smartgwt.client.data.DSResponse
public class DSResponse
Response sent by the server in response to a DSRequest
. Contains all the properties
available on the basic RPCResponse
, in addition to the properties listed here.
Field Summary |
---|
Fields inherited from class com.smartgwt.client.rpc.RPCResponse |
---|
STATUS_FAILURE, STATUS_LOGIN_INCORRECT, STATUS_LOGIN_REQUIRED, STATUS_LOGIN_SUCCESS, STATUS_MAX_LOGIN_ATTEMPTS_EXCEEDED, STATUS_SERVER_TIMEOUT, STATUS_SUCCESS, STATUS_TRANSPORT_ERROR, STATUS_VALIDATION_ERROR |
Fields inherited from class com.smartgwt.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
DSResponse()
|
|
DSResponse(JavaScriptObject jsObj)
|
Method Summary | |
---|---|
Record[] |
getData()
Return the data as an array of Records. |
RecordList |
getDataAsRecordList()
Return the data as a RecordList. |
Integer |
getEndRow()
End row of returned server results, when using paged result fetching |
Map |
getErrors()
Server-side validation errors for an attempted "update" or "add" operation, as a JS Object where each property name is a field name from the record and each property value is an error message to be shown to the user. |
Boolean |
getInvalidateCache()
Optional flag that can be set by the server to force ResultSets to drop any caches of records from the DataSource that was the target of the operation. |
static DSResponse |
getOrCreateRef(JavaScriptObject jsObj)
|
Integer |
getStartRow()
Starting row of returned server results, when using paged result fetching |
Integer |
getTotalRows()
Total number of rows available from the server that match the current filter criteria, when using paged result fetching. |
void |
setData(Record[] data)
For DataSource operations, this is typically either an Array of records representing records (for "fetch" operations) or a array of a single record representing the updated record (for "update", "add" or "remove" operations). |
void |
setEndRow(Integer endRow)
End row of returned server results, when using paged result fetching |
void |
setErrors(JavaScriptObject errors)
Server-side validation errors for an attempted "update" or "add" operation, as a JS Object where each property name is a field name from the record and each property value is an error message to be shown to the user. |
void |
setErrors(Map errors)
Server-side validation errors for an attempted "update" or "add" operation, as a JS Object where each property name is a field name from the record and each property value is an error message to be shown to the user. |
void |
setInvalidateCache(Boolean invalidateCache)
Optional flag that can be set by the server to force ResultSets to drop any caches of records from the DataSource that was the target of the operation. |
void |
setStartRow(Integer startRow)
Starting row of returned server results, when using paged result fetching |
void |
setTotalRows(Integer totalRows)
Total number of rows available from the server that match the current filter criteria, when using paged result fetching. |
Methods inherited from class com.smartgwt.client.rpc.RPCResponse |
---|
getHttpResponseCode, getStatus, getTransactionNum, setStatus |
Methods inherited from class com.smartgwt.client.core.JsObject |
---|
isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DSResponse()
public DSResponse(JavaScriptObject jsObj)
Method Detail |
---|
public static DSResponse getOrCreateRef(JavaScriptObject jsObj)
public Integer getStartRow()
Note that startRow and endRow are zero-based - the first record is row zero.
public Integer getEndRow()
Note that startRow and endRow are zero-based - the first record is row zero.
public Integer getTotalRows()
public Boolean getInvalidateCache()
public void setStartRow(Integer startRow)
Note that startRow and endRow are zero-based - the first record is row zero.
startRow
- the start rowpublic void setEndRow(Integer endRow)
Note that startRow and endRow are zero-based - the first record is row zero.
endRow
- the end rowpublic void setTotalRows(Integer totalRows)
totalRows
- total rowspublic void setInvalidateCache(Boolean invalidateCache)
invalidateCache
- invalidateCachepublic void setErrors(Map errors)
dsResponse.errors = { userId : "A user with this userId already exists", orderId : "No Order with ID '6A18294' exists" }The Java API DSResponse.addError(fieldName, errorMessage) is used to send server-side errors to the client. See the Java Server Reference for details.
errors
- errors mappublic void setErrors(JavaScriptObject errors)
dsResponse.errors = { userId : "A user with this userId already exists", orderId : "No Order with ID '6A18294' exists" }The Java API DSResponse.addError(fieldName, errorMessage) is used to send server-side errors to the client. See the Java Server Reference for details.
errors
- errors as JavaScriptObjectpublic Map getErrors()
dsResponse.errors = { userId : "A user with this userId already exists", orderId : "No Order with ID '6A18294' exists" }The Java API DSResponse.addError(fieldName, errorMessage) is used to send server-side errors to the client. See the Java Server Reference for details.
public void setData(Record[] data)
data
- the datapublic Record[] getData()
public RecordList getDataAsRecordList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |