*/
return isValid;
}
public Object viewToObj(Object supplier) {
Supplier obj;
if (supplier != null) {
obj = (Supplier) supplier;
} else {
obj = new Supplier();
}
Textbox uniIdTB = (Textbox) getFellow("uniId");
Textbox nameTB = (Textbox) getFellow("name");
Textbox shortNameTB = (Textbox) getFellow("shortName");
Textbox contactTB = (Textbox) getFellow("contact");
Textbox officeTel1TB = (Textbox) getFellow("officeTel1");
obj.setUniId(uniIdTB.getText());
obj.setName(nameTB.getText());
obj.setShortName(shortNameTB.getText());
obj.setContact(contactTB.getText());
obj.setOfficeTel1(officeTel1TB.getText());
Textbox inChargeTB = (Textbox) getFellow("inCharge");
Textbox regAddressZipTB = (Textbox) getFellow("regAddressZip");
Textbox regAddressTB = (Textbox) getFellow("regAddress");
Textbox docReceiverTB = (Textbox) getFellow("docReceiver");
Textbox recAddressZipTB = (Textbox) getFellow("recAddressZip");
obj.setInCharge(inChargeTB.getText());
obj.setRegAddressZip(regAddressZipTB.getText());
obj.setRegAddress(regAddressTB.getText());
obj.setDocReceiver(docReceiverTB.getText());
obj.setRecAddressZip(recAddressZipTB.getText());
Textbox recAddressTB = (Textbox) getFellow("recAddress");
obj.setRecAddress(recAddressTB.getText());
// optional fields
Textbox faxTelTB = (Textbox) getFellow("faxTel");
Textbox contactMobileTB = (Textbox) getFellow("contactMobile");
Textbox officeTel2TB = (Textbox) getFellow("officeTel2");
Textbox contactEmailTB = (Textbox) getFellow("contactEmail");
Intbox quotaTB = (Intbox) getFellow("quota");
obj.setFaxTel(faxTelTB.getText());
obj.setContactMobile(contactMobileTB.getText());
obj.setOfficeTel2(officeTel2TB.getText());
obj.setContactEmail(contactEmailTB.getText());
if (!"".equals(quotaTB.getText())) {
obj.setQuota(Integer.parseInt(quotaTB.getText()));
}
return obj;
}