Class GridExampleActionHandler
- java.lang.Object
-
- org.openbravo.client.kernel.BaseActionHandler
-
- org.openbravo.client.application.example.GridExampleActionHandler
-
- All Implemented Interfaces:
ActionHandler
@ApplicationScoped public class GridExampleActionHandler extends BaseActionHandler
The backing bean for a grid example. This backing bean does 2 things: 1) read data from the database to fill the grid and 2) execute an action using the selected data.- Author:
- mtaal
-
-
Constructor Summary
Constructors Constructor Description GridExampleActionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.codehaus.jettison.json.JSONObject
doDataCommand(Map<String,Object> parameters, String content)
Read the data from the database and return it as a json string.protected org.codehaus.jettison.json.JSONObject
doExecuteCommand(Map<String,Object> parameters, String content)
Execute an action on selected dataprotected org.codehaus.jettison.json.JSONObject
execute(Map<String,Object> parameters, String content)
Needs to be implemented by a subclass.-
Methods inherited from class org.openbravo.client.kernel.BaseActionHandler
execute, extractParametersFromRequest, extractRequestContent, fixRequestMap, writeResponse
-
-
-
-
Method Detail
-
execute
protected org.codehaus.jettison.json.JSONObject execute(Map<String,Object> parameters, String content)
Description copied from class:BaseActionHandler
Needs to be implemented by a subclass.- Specified by:
execute
in classBaseActionHandler
- Parameters:
parameters
- the parameters obtained from the request. Note that the request object and the session object are also present in this map, resp. as the constantsKernelConstants.HTTP_REQUEST
andKernelConstants.HTTP_SESSION
.content
- the request content (if any)- Returns:
- the return should be a JSONObject, this is passed back to the caller on the client.
-
doDataCommand
protected org.codehaus.jettison.json.JSONObject doDataCommand(Map<String,Object> parameters, String content)
Read the data from the database and return it as a json string.- Parameters:
parameters
- the request parameterscontent
- the request content, a json string- Returns:
- the data as a json object
-
-