Hi all,
using in this time MailAddress of registry module ,it 's too slow (on my
reguard ) to populate Locality Object. I try to explain by a code example :
MailAddress mail = new MailAddress();
mail.setDisplay("Personale");
mail.setCivic(request.getParameter("civic"));
mail.setStreet(request.getParameter("street"));
mail.setZipCode(request.getParameter("zipCode"));
Country country=new Country();
country=(Country)country.decode(request.getParameter("code");
Locality locality = new Locality();
locality.setCountry(country);
locality.setCity(request.getParameter("city"));
locality.setState(request.getParameter("state"));
mail.setLocality(locality);
that's all when anyone ,using smartweb ,try to populate a MailAddress from a
inherit Action.
As you can see one of this step can be reduced setting countryCode directly
by Locality as a String .
The code above become :
MailAddress mail=new MailAddress();
...
...
Locality locality=new Locality();
//Setting direct Country using decode method from Locality too.
locality.setCountry("it");
...
in this way it's more agile for a developer to populate the MailAddress,only
wrapping decode method from Country object!!
What do you think about?
I would like to modify it , reducing complexity and useless code.
Waiting for your reply
Giuseppe
--
View this message in context: http://www.nabble.com/-Smartweb-registry--Country-populate-not-agile-tp16398634s17546p16398634.html
Sent from the SmartWeb Developers mailing list archive at Nabble.com.
|