Saturday, February 27, 2010

Faster Development With EasyWicket

clipped from java.dzone.com

Faster Development With EasyWicket

For this reason, I am proposing another approach by using annotations to create and configure components on the server side. In order to explain it, I will create a simple "new user" page.
   @EasyWicket(id="form")
   Form<Void> form;
   @EasyWicket(id="form.txtName", value="name")
   TextField<String> txtName;
   @EasyWicket(id="form.countrySelection", value="selectedCountry",
            list="countryList", idProperty="name", displayProperty="name")
   DropDownChoice<Country> countrySelection;
   @EasyWicket(id="form.btnSubmit", action="actionSubmit")
   Button btnSubmit;
addComponentInstantiationListener(new EasyWicketComponentListener());
I attached source codes as zip file. Also you can get codes from easywicket.sourceforge.net.

0 comments: