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| Constructor and Description |
|---|
ActionResponse() |
| Modifier and Type | Method and Description |
|---|---|
void |
setAlert(String message)
Set an alert message.
|
void |
setAttr(String fieldName,
String attr,
Object value)
Set an attribute of a field.
|
void |
setAttrs(Map<String,Map<String,Object>> attrs)
Set field attributes.
|
void |
setCanClose(boolean canClose)
Set the canClose flag.
|
void |
setColor(String fieldName,
String color)
Set the
color attribute for the given field. |
void |
setError(String message)
Set an error message.
|
void |
setExportFile(String path)
Set the file path relative to the data export directory.
|
void |
setFlash(String flash)
Set a flash message.
|
void |
setHidden(String fieldName,
boolean hidden)
Set the
hidden attribute for the given field. |
void |
setNotify(String message)
Set a notification message.
|
void |
setPending(String actions)
Set the comma separated list of pending actions.
|
void |
setReadonly(String fieldName,
boolean readonly)
Set the
readonly attribute for the given field. |
void |
setReload(boolean reload)
Set the reload flag.
|
void |
setRequired(String fieldName,
boolean required)
Set the
required attribute for the given field. |
void |
setSignal(String signal,
Object data)
Send an arbitrary signal to the client view with the specified data.
|
void |
setValue(String fieldName,
Object value)
Set value for the given field.
|
void |
setValues(Object context)
Set record values.
|
void |
setView(Map<String,Object> view)
Inform the client to open the given view.
|
void |
setView(String title,
String model,
String mode,
String domain)
Inform the client to open a view for the given model.
|
public void setReload(boolean reload)
The client user reload flag to refresh the view.
reload - whether to reload client viewpublic void setCanClose(boolean canClose)
The client uses the canClose flag to decide whether the view can be closed.
canClose - whether the view can be closed.public void setFlash(String flash)
This message will be shown on the client screen as a dialog.
flash - the message to show on clientpublic void setNotify(String message)
The message will be show on the client screen as a notification.
message - the message to show on clientpublic void setAlert(String message)
The message will be shown on the client screen as an alert dialog.
message - the message to show as an alertpublic void setError(String message)
The message will be shown on the client screen as an error dialog.
message - the message to show as an errorpublic void setPending(String actions)
This can be used along with setAlert(String),
setError(String) methods.
actions - the list of pending actionspublic void setExportFile(String path)
The client will initiate downloading the exported file.
path - the relative path to the exported filepublic void setValues(Object context)
The client updates current view with these values.
context - a map or a model instancesetValue(String, Object)public void setValue(String fieldName, Object value)
fieldName - name of the fieldvalue - field namesetValues(Object)public void setView(Map<String,Object> view)
view - the view to showpublic void setView(String title, String model, String mode, String domain)
title - the view titlemodel - the model namemode - the view mode (e.g. form, grid etc)domain - the filterpublic void setSignal(String signal, Object data)
signal - signal namedata - signal datapublic void setAttrs(Map<String,Map<String,Object>> attrs)
The client view may update the view fields with the given attributes.
attrs - attribute map for the fieldspublic void setAttr(String fieldName, String attr, Object value)
fieldName - name of the fieldattr - attribute namevalue - attribute valuepublic void setRequired(String fieldName, boolean required)
required attribute for the given field.fieldName - name of the fieldrequired - true or falsepublic void setReadonly(String fieldName, boolean readonly)
readonly attribute for the given field.fieldName - name of the fieldreadonly - true or falsepublic void setHidden(String fieldName, boolean hidden)
hidden attribute for the given field.fieldName - name of the fieldhidden - true or false