Showing posts with label playframework. Show all posts
Showing posts with label playframework. Show all posts

December 12, 2014

play2 controller get input parameters using implicit objects

play2 controller get input parameters using implicit objects or functions ?

If you are using play1.X framework you can use "params" implicit object to get the input parameters.

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