Package ru.bgcrm.struts.form
Class Response
java.lang.Object
ru.bgcrm.struts.form.Response
HTTP response object, may be JSON serialized.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddEvent(ClientEvent event) Add an event for frontend.voidaddPageable(Pageable<?> result) Adds search result to the response data, two objects with keys: 'page' and 'list'getData()Response data.Events for processing of frontend.Message forSTATUS_ERRORorSTATUS_MESSAGE.voidSet response data object.voidsetMessage(String message) voidSet status of request's execution. 
- 
Field Details
- 
STATUS_OK
- See Also:
 
 - 
STATUS_ERROR
- See Also:
 
 - 
STATUS_MESSAGE
- See Also:
 
 
 - 
 - 
Constructor Details
- 
Response
public Response() 
 - 
 - 
Method Details
- 
getStatus
- Returns:
 
 - 
setStatus
Set status of request's execution.- Parameters:
 status-
 - 
getMessage
Message forSTATUS_ERRORorSTATUS_MESSAGE.- Returns:
 
 - 
setMessage
 - 
getEventList
Events for processing of frontend.- Returns:
 
 - 
addEvent
Add an event for frontend.- Parameters:
 event-
 - 
getData
Response data. May be serialized to JSON, or available on JSP page.- Returns:
 
 - 
setData
Set response data object.- Parameters:
 key-data-
 - 
addPageable
Adds search result to the response data, two objects with keys: 'page' and 'list'- Parameters:
 result-
 
 -