@DefaultHandler
public Resolution save() {
final String sFormerId = getParam("client.id");
if (getErrorsCount()==0) {
try {
Client oClnt;
connect(getSessionAttribute("nickname"), getSessionAttribute("password"));
if (sFormerId.length()>0) {
oClnt = new Client();
oClnt.load(getSession(), sFormerId);
} else {
CustomerAccount oCacc = new CustomerAccount(getSession().getDms(), getSessionAttribute("customer_account_docid"));
oClnt = new Client(getSession(), oCacc.clients(getSession()));
}
saveRequest(oClnt);
disconnect();
addDataLine("id",oClnt.id());
} catch (Exception xcpt) {
Log.out.error(xcpt.getMessage(), xcpt);
addError(new SimpleError(xcpt.getMessage()));
} finally {
close();