ControllerResponse Class

From AgileApps Support Wiki

This class is the return value of the Controller.execute method.

The two primary operations you perform with an instance of ControllerResponse are:

  • Sets the return data via setData
  • Sets the next page to display via setTargetPage

For more, see Working with Pages and Classes and Controller Interface.

getErrorLevel

Returns the error level.

Syntax

final int getErrorLevel()

Parameters None

Return The error level

setErrorLevel

Sets an error level which lets you track the status of the ControllerResponse.

Syntax

final void setErrorLevel(int errorLevel)

Parameters

errorLevel
The error level

Return None

getMessage

Returns the message.

Syntax

final String getMessage()

Parameters None

Return The message

setMessage

Sets a message which lets you track the status of the ControllerResponse.

Syntax

final void setMessage(String message)

Parameters

message
The message

Return None

getTargetPage

Returns the name of the next page to display.

Syntax

final String getTargetPage()

Parameters None

Return The target page

setTargetPage

Sets the name of the next page to display.

Syntax

final void setTargetPage(String targetPage)

Parameters

targetPage
The target page

Return None

getData

Returns the data to be made available to the page.

Syntax

public final Object getData()

Parameters None

Return The data to be made available to the page.

setData

Sets the data to be made available to the page.

Syntax

public final void setData(Object data)

Parameters

data
The data to be made available to the page.

Return None