December 08, 2014

List of implicit objects and methods in Play framework Controller class and it's subclasses

List of implicit objects in Play framework Controller class and it's subclasses

1) params (Wonder how we can use a member variable inside the static action methods ?)
Example:
String id =  params.get("id");
String[] names = params.get("names");

2) response
3) request


Note: All these implicit objects is not available from Play2.0
You need to use alternative methods.

request and response implicit objects should be replaced with a call to request() and response() static methods in Controller class.

List of implicit methods in Play framework Controller class and it's subclasses

1) Render methods like render(), renderText(String), renderJSON(..), renderXml(..), etc

No comments :

Post a Comment