Logic.java 文件源码

java
阅读 67 收藏 0 点赞 0 评论 0

项目:AvoinApotti 作者:
public boolean save() throws ims.framework.exceptions.PresentationLogicException
{
    CommunityServiceVo vo = populateInstanceData();

    if (form.ctnServiceDetail().cmbService().getValue() == null)
    {
        engine.showMessage("Please select a Service Type");
        return false;
    }

    if ((!form.ctnServiceDetail().chkSupplyServiceDetail().getValue()) && form.ctnServiceDetail().cmbLocation().getValue() == null)
    {
        engine.showMessage("Please select a Location");
        return false;
    }

    if(vo.getAuthoringInformation() == null || vo.getAuthoringInformation().getAuthoringHcp() == null || vo.getAuthoringInformation().getAuthoringDateTime() == null)
    {
        engine.showMessage("Please enter Authoring Information");
        return false;
    }

    String[] arrErrors = vo.validate();
    if(arrErrors != null)
    {
        engine.showErrors(arrErrors);
        return false;
    }
    try 
    {
        form.getLocalContext().setSelectedRecord(domain.saveCommunitService(vo));
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        open();
        return false;
    }
    return true;

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号