![]() |
| From Programming Hunter |
เรามีวิธีการคืนค่าดังนี้ครับ
ในไฟล์ Simple Method ให้ใช้แทค
ตัวอย่างการใช้งาน
ในไฟล์ java ให้ใช้ดังนี้
ServiceUtil.returnError(errorMessageList); ServiceUtil.returnError(errorMessage); ServiceUtil.returnError(errorMessage, errorMessageList); ServiceUtil.returnError(errorMessage, errorMessageList, errorMessageMap, nestedResult);
ตัวอย่างการใช้งาน
*return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.create.person_exists", locale));
*errMsg = UtilProperties.getMessage(resource,"partyservices.could_not_add_affiliate_info_write", messageMap, locale);
return ServiceUtil.returnError(errMsg);
*List errorMessageList = new LinkedList();
...
...
errorMessageList.add(UtilProperties.getMessage(resource, "AccountingSpecifyInvoiceToPaymentBillingAccountTaxGeoId", locale));
...
...
if (errorMessageList.size() > 0) {
return ServiceUtil.returnError(errorMessageList);
}

0 comments:
Post a Comment