Retrieve request data
Controller class can easily access request data by just doing a static import of the ActionControl class in the controller.
import static com.scooterframework.web.controller.ActionControl.*;
The following methods are available. For convenience, all these methods start with p.
p(String)//Get the value corresponding to a key -- this is mostly for http input tag //(equivalent to request.getParameter(key) or request.getAttribute(key)) public static String p(String key);pArray(String)
//Get a string array corresponding to a key -- this is used for select list or checkbox tag public static String[] pArray(String key);pBoolean(String)
//Get true or false corresponding to a key -- this is used for radio button tag public static Boolean pBoolean(String key);pDate(String)
//Get a date instance corresponding to a key -- this is used for date input tag public static Date pDate(String key);pDate(String, String)
//Get a date instance corresponding to a key -- this is used for date input tag public static Date pDate(String key, String pattern);pFile(String)
//Get an upload file corresponding to a key -- this is used for file upload public static UploadFile pFile(String key);pFiles()
//Get a list of upload files -- this is used for file upload public static ListpFiles();
You may take a look at the RegistrationController class in examples/greeting sample app to see how the above methods are used to parse data entry for a registration form.
For upload related example, it is in examples/uploadexample sample app.