Class ActionResponse
Response to be used with controllers.-
Field Summary
Fields inherited from class com.axelor.rpc.Response
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSet an alert message.voidSet an alert message.voidsetAlert(String message, String title, String confirmBtnTitle, String cancelBtnTitle, String action) Set an alert message.voidSet an attribute of a field.voidSet field attributes.voidsetCanClose(boolean canClose) Set the canClose flag.voidSet thecolorattribute for the given field.voidSet an error message.voidSet an error message.voidSet an error message.voidsetExportFile(InputStream stream, String fileName) Set the file stream to be exported.voidsetExportFile(String path) Set the file path to be exported.voidsetExportFile(String path, String fileName) Set the file path to be exported.voidsetExportFile(Path path) Set the file path to be exported.voidsetExportFile(Path path, String fileName) Set the file path to be exported.voidSet thehiddenattribute for the given field.voidSet an info message.voidSet an info message.voidSet an info message.voidSet a notification message.voidSet a notification message.voidsetPending(String actions) Set the comma separated list of pending actions.voidsetReadonly(String fieldName, boolean readonly) Set thereadonlyattribute for the given field.voidsetReload(boolean reload) Set the reload flag.voidsetRequired(String fieldName, boolean required) Set therequiredattribute for the given field.voidSend an arbitrary signal to the client view with the specified data.voidSet value for the given field.voidSet record values.voidInform the client to open a view for the given model.voidInform the client to open the given view.
-
Constructor Details
-
ActionResponse
public ActionResponse()
-
-
Method Details
-
setReload
public void setReload(boolean reload) Set the reload flag.The client user reload flag to refresh the view.
- Parameters:
reload- whether to reload client view
-
setCanClose
public void setCanClose(boolean canClose) Set the canClose flag.The client uses the canClose flag to decide whether the view can be closed.
- Parameters:
canClose- whether the view can be closed.
-
setInfo
Set an info message.This message will be shown on the client screen as a dialog.
- Parameters:
message- the message to show on client
-
setInfo
Set an info message.This message will be shown on the client screen as a dialog.
- Parameters:
message- the message to show on clienttitle- the title of the modal
-
setInfo
Set an info message.This message will be shown on the client screen as a dialog.
- Parameters:
message- the message to show on clienttitle- the title of the modalconfirmBtnTitle- the title of the confirm button
-
setNotify
Set a notification message.The message will be show on the client screen as a notification.
- Parameters:
message- the message to show on client
-
setNotify
Set a notification message.The message will be show on the client screen as a notification.
- Parameters:
message- the message to show on clienttitle- the title of the notification box
-
setAlert
Set an alert message.The message will be shown on the client screen as an alert dialog.
- Parameters:
message- the message to show as an alert
-
setAlert
Set an alert message.The message will be shown on the client screen as an alert dialog.
- Parameters:
message- the message to show as an alerttitle- the title of the modal
-
setAlert
public void setAlert(String message, String title, String confirmBtnTitle, String cancelBtnTitle, String action) Set an alert message.The message will be shown on the client screen as an alert dialog.
- Parameters:
message- the message to show as an alerttitle- the title of the modalconfirmBtnTitle- the title of the confirm buttoncancelBtnTitle- the title of the cancel buttonaction- action to be executed on error or alert message to make corrective measures, when error dialog is closed or alert dialog is canceled.
-
setError
Set an error message.The message will be shown on the client screen as an error dialog.
- Parameters:
message- the message to show as an error
-
setError
Set an error message.The message will be shown on the client screen as an error dialog.
- Parameters:
message- the message to show as an errortitle- the title of the modal
-
setError
Set an error message.The message will be shown on the client screen as an error dialog.
- Parameters:
message- the message to show as an errortitle- the title of the modalconfirmBtnTitle- the title of the confirm buttonaction- action to be executed on error or alert message to make corrective measures, when error dialog is closed or alert dialog is canceled.
-
setPending
Set the comma separated list of pending actions.This can be used along with
setAlert(String),setError(String)methods.- Parameters:
actions- the list of pending actions
-
setExportFile
Set the file path to be exported.The file path is copied to a dedicated temporary file for pending export.
The client will initiate downloading the export file.
- Parameters:
path- the path to the export file
-
setExportFile
Set the file path to be exported.The file path is copied to a dedicated temporary file for pending export.
The client will initiate downloading the export file.
- Parameters:
path- the path to the export filefileName- the name of the downloaded export file
-
setExportFile
Set the file path to be exported.The file path is copied to a dedicated temporary file for pending export.
The client will initiate downloading the export file.
- Parameters:
path- the path to the export file
-
setExportFile
Set the file path to be exported.The file path is copied to a dedicated temporary file for pending export.
The client will initiate downloading the export file.
- Parameters:
path- the path to the export filefileName- the name of the downloaded export file
-
setExportFile
Set the file stream to be exported.This creates a pending export file from the given stream.
The client will initiate downloading the export file.
- Parameters:
stream- the stream to the export filefileName- the name of the downloaded export file
-
setValues
Set record values.The client will update current view with these values.
The context can be a
Map,ContextorModelproxy obtained withContext.asType(Class). Managed instance ofModelshould be avoided.- Parameters:
context- the context to set, a map or context proxy- Throws:
IllegalArgumentException- if passed context is detached non-proxy entity.- See Also:
-
setValue
Set value for the given field.- Parameters:
fieldName- name of the fieldvalue- field name- See Also:
-
setView
Inform the client to open the given view.- Parameters:
view- the view to show
-
setView
Inform the client to open a view for the given model.- Parameters:
title- the view titlemodel- the model namemode- the view mode (e.g. form, grid etc)domain- the filter
-
setSignal
Send an arbitrary signal to the client view with the specified data.- Parameters:
signal- signal namedata- signal data
-
setAttrs
Set field attributes.The client view may update the view fields with the given attributes.
- Parameters:
attrs- attribute map for the fields
-
setAttr
Set an attribute of a field.- Parameters:
fieldName- name of the fieldattr- attribute namevalue- attribute value
-
setRequired
Set therequiredattribute for the given field.- Parameters:
fieldName- name of the fieldrequired- true or false
-
setReadonly
Set thereadonlyattribute for the given field.- Parameters:
fieldName- name of the fieldreadonly- true or false
-
setHidden
Set thehiddenattribute for the given field.- Parameters:
fieldName- name of the fieldhidden- true or false
-
setColor
Set thecolorattribute for the given field.- Parameters:
fieldName- name of the fieldcolor- CSS compatible color value
-